Closed
Description
openedon Oct 28, 2021
As of the 2021-09-23 nightly, rustc has stopped producing debug output for variables in a specific combination of circumstances:
- The variable is
static
- It is defined in a lib crate.
- The lib crate is included in a bin crate.
- The bin crate is built with
lto = true
.
We noticed this after bumping past 09-23 to the 2021-10-27 nightly, when our debugger broke. The static is still being included in the ELF output (both allocated space, and represented correctly in the symtab), but is missing from DWARF. Bisecting indicates 2021-09-23 as the culprit (09-22 works).
Here is a repro case that I've reduced that works on linux x86-64, at least, and probably other DWARF platforms.
https://github.com/cbiffle/rustc-dwarf-regression-repro
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Link-time optimization (LTO)Area: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Reproducible / deterministic buildsCategory: This is a bug.High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.