-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
regression: panic! and RUST_BACKTRACE=1 Show Wrong & Non-Informative Function Names when Unwinding #78713
Copy link
Copy link
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.O-windowsOperating system: WindowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.Category: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.O-windowsOperating system: WindowsOperating system: WindowsO-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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: