Infinite/long backtrace on i686 under Wine #135717
Labels
A-backtrace
Area: Backtraces
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
A-panic
Area: Panicking machinery
A-runtime
Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
C-bug
Category: This is a bug.
E-needs-investigation
Call for partcipation: This issues needs some investigation to determine current status
O-windows
Operating system: Windows
O-x86_32
Target: x86 processors, 32 bit (like i686-*)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm not sure where to file this bug, but it affects Rust more than other languages for reasons explained below, so let's at least make this visible here.
I tried running this code:
with
RUST_BACKTRACE=full
under Wine.I expected to see this happen: a short backtrace.
Instead, this happened: an infinite backtrace on i686-pc-windows-msvc and a finite, but longer than necessary, repetitive, and clearly wrong backtrace on i686-pc-windows-gnu.
This might not seem like much (does anyone use
RUST_BACKTRACE=full
in production?), but Rust forces a full backtrace on double panic, so panics in destructors effectively hang the process instead of aborting it. Beautiful.I think it's fair to say that this is likely a Wine bug, however, I think it's also possible that LLVM generates wrong SEH frames, which Windows handles correctly only by chance. As a workaround, we might want to somewhat limit the backtrace length even on double panic?
Meta
rustc --version --verbose
:wine --version
:wine-9.22 (Staging)
I'm cross-compiling for Windows with cargo-xwin for MSVC ABI and cross for GNU ABI:
XWIN_ARCH=x86 RUST_BACKTRACE=full cargo xwin run --target i686-pc-windows-msvc
RUST_BACKTRACE=full cross run --target i686-pc-windows-gnu
...but I have checked that the problem can be reproduced with executables built natively on Windows.
RUST_BACKTRACE=full
backtrace on MSVCRUST_BACKTRACE=full
backtrace on GNU@rustbot label +A-backtrace +A-debuginfo +A-panic +A-runtime +E-needs-investigation +O-windows +O-x86_32 +T-compiler
The text was updated successfully, but these errors were encountered: