-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUST_BACKTRACE does not work anymore? #50138
Comments
Interesting. I found at least 2 tests regarding to https://github.com/rust-lang/rust/blob/master/src/test/run-pass/backtrace.rs They are not run on Windows? |
I'm also experiencing this. |
Probably #47252 is a culprit. @alexcrichton I am not sure which team could look on this. |
Unable to reproduce on Windows 10. Can everyone please report which version of Windows they're using?
|
Well, sure: StackWalkEx was introduced in DbgHelp.dll 6.2. Windows 7 SP1 has dbghelp 6.1.7601 by default. And it is not updated by VS / Tools / Debuggers / whatever. If I manually put a newer dbghelp near an executable, stacktrace prints fine. So yes, this bug was introduced in #47252. And tests could not catch it, probably, because they are run on Windows 10 or something. |
What was the point to use upd: I see. |
cc @Zoxc as the author of the change ✋ |
So clearly the solution is to add the old |
PR rust-lang#47252 switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Fixes rust-lang#50138
PR #47252 switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Fixes #50138
Add a fallback for stacktrace printing for older Windows versions. Some time ago we switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Tested on my Windows 7 - both msvc and gnu versions produce a readable stacktrace. Fixes #50138
I have noticed a backtrace absence on Windows for a while. Stable/Nightly - all the same.
Checked on:
stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc
update 1:
1.24.1
works fine. How come?update 2:
CARGO_INCREMENTAL=0
has no effect on it.Linux binaries work as expected, with respect of
0
,1
,full
values of theRUST_BACKTRACE
.Windows binaries print exactly the same output regardless of environment variable (excluding note):
RUST_BACKTRACE=0
:RUST_BACKTRACE=1
:Dummy code to reproduce
The text was updated successfully, but these errors were encountered: