-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rust 1.57.0 regressed DWARF for trait objects #93164
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 9, 2022
…debuginfo-regression, r=wesleywiser debuginfo: Fix DW_AT_containing_type vtable debuginfo regression This PR brings back the `DW_AT_containing_type` attribute for vtables after it has accidentally been removed in rust-lang#89597. It also implements a more accurate description of vtables. Instead of describing them as an array of void pointers, the compiler will now emit a struct type description with a field for each entry of the vtable. r? `@wesleywiser` This PR should fix issue rust-lang#93164. ~~The PR is blocked on rust-lang#93154 because both of them modify the `codegen/debug-vtable.rs` test case.~~
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 9, 2022
…debuginfo-regression, r=wesleywiser debuginfo: Fix DW_AT_containing_type vtable debuginfo regression This PR brings back the `DW_AT_containing_type` attribute for vtables after it has accidentally been removed in rust-lang#89597. It also implements a more accurate description of vtables. Instead of describing them as an array of void pointers, the compiler will now emit a struct type description with a field for each entry of the vtable. r? ``@wesleywiser`` This PR should fix issue rust-lang#93164. ~~The PR is blocked on rust-lang#93154 because both of them modify the `codegen/debug-vtable.rs` test case.~~
FWIW I can confirm this seems to be fixed in nightly. |
Great! There's a test now that should prevent this from regressing again. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I noticed this problem when running gdb's test suite after the 1.58 release, so I tried various earlier releases and found that the regression entered in 1.57.0.
The test case is a basic one from the gdb test suite:
The test suite then proceeds to check for the Rust DWARF extension by running
readelf
and looking forDW_AT_containing_type
. With 1.56.0, this passes, but with 1.57.0, this is not found.You can test it by compiling like:
FWIW this functionality landed in
ae4cc6069626206b493caf6b1158d3d5d601bbc7
. Looking at it now, I see that it did not include a test that checked to verify that the desired DWARF was generated. So, it's understandable that this could regress.This particular DWARF extension is useful when examining trait objects. It lets a debugger find the correct type at runtime.
The text was updated successfully, but these errors were encountered: