-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Rust 1.34 generates significantly less debug information for libstd functions vs. Rust 1.33 #60020
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.)P-highHigh priorityHigh 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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)P-highHigh priorityHigh 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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
A Firefox developer filed a bug report about Rust symbols not being correctly represented in crash reports:
The expectation was that, e.g.
rust_panic_with_hookwould have beenstd::panicking::rust_panic_with_hook.We had recently upgraded to Rust 1.34, which led to comparing object files before and after the upgrade. I compared Linux x86-64 binaries; I don't see why the analysis doesn't apply to OS X's Mach-O files, but it's possible the results are different there. (The above crash is from OS X, and we have crashes using Rust 1.33 that do display
std::panicking::rust_panic_with_hookand similar.) The ELF symbol table in both cases listsrust_panic_with_hookas_ZN3std9panicking20rust_panic_with_hook$UNIQUE_ID, so that wasn't the problem.We then looked at the debug information. Rust 1.33 generated, according to
readelf --debug-dump=info:Notice the existence of both
DW_AT_nameandDW_AT_linkage_name. Rust 1.34, in contrast, generated:which drops the
DW_AT_linkage_nameand is also significantly less informative than its predecessor.I'm not familiar enough with
rustcto know what might have caused this regression. One of my colleagues pointed out #58208, which changed how various bits of panic infrastructure are imported intolibstd. It's not clear to me whether it's that specific change, or how the compiler internally describescrate::symbols to LLVM, or something else entirely.cc @glandium @michaelwoerister