-
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
Unconsistent dwarf information between 1.70 and 1.71 #113819
Comments
@rustbot label -regression-untriaged +regression-from-stable-to-stable |
The previous behavior can be reproduced by adding |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium +E-needs-bisection |
|
Continuing manually
|
Disabling the SingleUseConsts pass (which is the successor to ConstDebugInfo) does fix this. |
@rustbot claim |
Code
I tried this code:
Then run this with rust-gdb:
for rust 1.70 output is correct:
for rust 1.71 output contains uninitialized variable:
Lets see whats changed in dwarf, i dump'd 1.70 and 1.71 versions and check difference.
First for 1.70, lexical block of var_b:
And line number info for line 3:
So it's ok, pc of lexical block for var_b greater then pc of line 3 start, and debugger doesnt show var_b.
Now for 1.71. Lexical block of var_b:
And line number info for line 3:
In dwarf generated by rustc 1.71 pc of var_b lexical block are equal to pc of line 3, that's why we see an uninitialized variable.
Version it worked on
Rust 1.70
Version with regression
rustc 1.71.0 (8ede3aa 2023-07-12)
binary: rustc
commit-hash: 8ede3aa
commit-date: 2023-07-12
host: x86_64-unknown-linux-gnu
release: 1.71.0
LLVM version: 16.0.5
The text was updated successfully, but these errors were encountered: