-
Notifications
You must be signed in to change notification settings - Fork 13k
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
regression: panic!
and RUST_BACKTRACE=1 Show Wrong & Non-Informative Function Names when Unwinding
#78713
Comments
panic!
and RUST_BACKTRACE=1 Show Wrong & Non-Informative Function Names when Unwindingpanic!
and RUST_BACKTRACE=1 Show Wrong & Non-Informative Function Names when Unwinding
Simply testing the example code as provided I find,
, under,
, so this might be restricted to |
Bisected to nightly-2020-08-09
(if I've done correctly), bisected with script:
|
Assigning priority as discussed as part of the Prioritization Working Group procedure and removing @rustbot label -I-prioritize +P-medium |
I think #75048 was the likely culprit. |
Is the backtrace correctly described with |
@eggyal In my local test with |
Has this issue been fixed? |
The issue still occurs with 1.54 on Windows.
|
Thanks for testing it! Marking this as a Windows issue. I've tested it on both Linux and Mac, where it works fine. |
It also works fine on |
I can still reproduce this on 1.61.0 but with a weird caveat I haven't seen mentioned anywhere: it works correctly through cargo but not rustc directly? cargo
rustc
Also RUST_BACKTRACE=full does not seem to resolve the problem |
If you don't specify |
Yup, that did the trick
|
So to confirm, this is considered fixed? Or do we still need to handle the |
This still happens unless @wesleywiser suggests that:
|
@ChrisDenton Do you mean for the release profile? I don't think we should be adding any debuginfo to release builds unless the user requests that. |
I don't personally have a strong opinion here tbh but I think that was what @wesleywiser was saying. I could be mistaken though. |
Ok, just to clarify the issue here. When using Something about this seems to confuse the backtrace. Our backtrace-rs defers to dbghelp.dll so this is probably either a bug in the compiler or in dbghelp.dll. It could also be a problem with the way backtrace-rs uses dbghelp.dll. Here's a demo of the issue. The
debuginfo=0, strip=debuginfo
debuginfo=0
debuginfo=1
|
Add the T-compiler tag in case they want to look at this. |
As I'm learning the language from a book ("The Complete Rust Programming Reference Guide" p. 229-230), and was executing the
panic!
macro in a multi-thread environment, I've noticed the unwinding from the book is different from the one I've got where the one I've got is not informative or helpful, and seems wrong where the one in book seems to be OK.Code
I tried this code:
I expected the backtrace to include the function names as they were called, all the way from the entry point of the threads.
Instead, all functions were named the same:
(env:
RUST_BACKTRACE=1
)Version it worked on
I don't know from when is the regression. The book is using an old version of Rust: 1.32.0
Version with regression
I use the most current version: Rust 1.47.0
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: