-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Backtrace contains function names with MIR, but not on MSVC. #32384
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
Comments
The function address -> symbol name information is in the .pdb produced by the linker. When Rust does not emit debug info it still tells the linker to emit a .pdb, but since the object files don't have any debug info, the only symbol names they have are for symbols that are publicly visible to other object files. Thus symbols internal to object files don't get resolved in backtraces.. |
From @retep998 (aka WindowsBunny) on IRC:
So it seems we can't do anything about this other than to make it not use MIR on MSVC. |
The fix should be to add, at the top of the test: #![feature(rustc_attrs)] And before each of // FIXME #31005 MIR missing debuginfo currently.
#[cfg_attr(target_env = "msvc", rustc_no_mir)] I can't test it myself as I have no MSVC setup currently and I don't want to waste buildbot time. |
Yeah this test just required debuginfo on MSVC for now, seems fine to disable MIR temporarily while we sort out that story for this test specifically. |
Annotate run-pass/backtrace with #[rustc_no_mir] on MSVC. Fixes rust-lang#32384 by not using MIR on MSVC for the functions in the path of the backtrace. This is the known blocker for the MSVC MIR builder, hopefully the only one overall. r? @alexcrichton Confirmed to work on a nightly, by @retep998.
From http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-mir/builds/9/steps/test/logs/stdio:
Instead of the actual function names, we get
__ImageBase
- which suggestsinternal
functions don't get symbols on MSVC without debuginfo, but what part of debuginfo does it need? cc @michaelwoeristerThe test also passes on linux w/ MIR - http://buildbot.rust-lang.org/builders/auto-linux-64-opt-mir/builds/10/steps/test/logs/stdio contains:
This is blocking gating on the
auto-win-msvc-64-opt-mir
. cc @alexcrichtonThe text was updated successfully, but these errors were encountered: