-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Devise a way to test debuginfo #2195
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
Milestone
Comments
ghost
assigned brson
Apr 12, 2012
One obvious thing is setting up a debuginfo bot that builds everything with debug info, but we need real debuginfo tests too. |
yeah. there are several tools that know how to dump dwarf to text, and gdb can also be driven by batch input as well as embedded python scripts. this should be very possible. |
Closed
@bleibig added support to compiletest for driving gdb and interpreting the results. Considering this done, now let's use it! |
Gankra
added a commit
to Gankra/rust
that referenced
this issue
Nov 1, 2017
This verifies the layout specified in rfc rust-lang#2195
Gankra
added a commit
to Gankra/rust
that referenced
this issue
Nov 8, 2017
This verifies the layout specified in rfc rust-lang#2195
petertodd
added a commit
to petertodd/rust
that referenced
this issue
Dec 8, 2018
RFC rust-lang#2195 specifies that a repr(int) enum such as: #[repr(u8)] enum MyEnum { B { x: u8, y: i16, z: u8 }, } has a layout that is equivalent to: #[repr(C)] enum MyEnumVariantB { tag: u8, x: u8, y: i16, z: u8 }, However this isn't actually implemented, with the actual layout being roughly equivalent to: union MyEnumPayload { B { x: u8, y: i16, z: u8 }, } #[repr(packed)] struct MyEnum { tag: u8, payload: MyEnumPayload, } Thus the variant payload is *not* subject to repr(C) ordering rules, and gets re-ordered as `{ x: u8, z: u8, z: i16 }` The existing tests added in pull-req rust-lang#45688 fail to catch this as the repr(C) ordering just happens to match the current Rust ordering in this case; adding a third field reveals the problem.
emilio
pushed a commit
to emilio/rust
that referenced
this issue
Dec 16, 2018
RFC rust-lang#2195 specifies that a repr(int) enum such as: #[repr(u8)] enum MyEnum { B { x: u8, y: i16, z: u8 }, } has a layout that is equivalent to: #[repr(C)] enum MyEnumVariantB { tag: u8, x: u8, y: i16, z: u8 }, However this isn't actually implemented, with the actual layout being roughly equivalent to: union MyEnumPayload { B { x: u8, y: i16, z: u8 }, } #[repr(packed)] struct MyEnum { tag: u8, payload: MyEnumPayload, } Thus the variant payload is *not* subject to repr(C) ordering rules, and gets re-ordered as `{ x: u8, z: u8, z: i16 }` The existing tests added in pull-req rust-lang#45688 fail to catch this as the repr(C) ordering just happens to match the current Rust ordering in this case; adding a third field reveals the problem.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 22, 2022
test for Stacked Borrows error during vtable validation Fixes rust-lang/miri#2123 Needs rust-lang#97761
celinval
pushed a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
Debug info is very prone to breakage. We should come up with a way to test it. Maybe look into how LLVM does it.
The text was updated successfully, but these errors were encountered: