-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
CFI: Monomorphize transparent ADTs before typeid #106232
Conversation
r? @Nilstrieb (rustbot has picked a reviewer for you, use r? to override) |
cc @rcvalle |
eeb0f1e
to
1760e37
Compare
compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs
Outdated
Show resolved
Hide resolved
One change and this can be r+'d. |
1760e37
to
c7736bb
Compare
src/test/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs
Outdated
Show resolved
Hide resolved
src/test/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs
Outdated
Show resolved
Hide resolved
Thanks for reporting and also working on a fix/solution for it, @maurer! Much appreciated. |
(I also just wanted to let you know that I’m currently on vacation so my responses may be delayed.) |
@bors delegate=rcvalle |
✌️ @rcvalle can now approve this pull request |
Monomorphise `#[repr(transparent)]` parameterized ADTs before turning them into an Itanium mangled String. `#[repr(transparent)]` ADTs currently use the single field to represent them in their CFI type ID to ensure that they are compatible. However, if that type involves a type parameter instantiated at the ADT level, as in `ManuallyDrop`, this will currently ICE as the `Parameter` type cannot be mangled. Since this happens at lowering time, it should always be concrete after substitution. Fixes rust-lang#106230
c7736bb
to
fb2c27d
Compare
@bors r+ |
CFI: Monomorphize transparent ADTs before typeid Monomorphise `#[repr(transparent)]` parameterized ADTs before turning them into an Itanium mangled String. `#[repr(transparent)]` ADTs currently use the single field to represent them in their CFI type ID to ensure that they are compatible. However, if that type involves a type parameter instantiated at the ADT level, as in `ManuallyDrop`, this will currently ICE as the `Parameter` type cannot be mangled. Since this happens at lowering time, it should always be concrete after substitution. Fixes rust-lang#106230
CFI: Monomorphize transparent ADTs before typeid Monomorphise `#[repr(transparent)]` parameterized ADTs before turning them into an Itanium mangled String. `#[repr(transparent)]` ADTs currently use the single field to represent them in their CFI type ID to ensure that they are compatible. However, if that type involves a type parameter instantiated at the ADT level, as in `ManuallyDrop`, this will currently ICE as the `Parameter` type cannot be mangled. Since this happens at lowering time, it should always be concrete after substitution. Fixes rust-lang#106230
⌛ Testing commit fb2c27d with merge 8007b106aa929d53fed4e9826b7c74ce405b0341... |
💔 Test failed - checks-actions |
@bors treeclosed=500 tidy merge check is breaking both here and in #106319 (comment) |
@bors r=Nilstrieb |
💡 This pull request was already approved, no need to approve it again.
|
🌲 The tree is currently closed for pull requests below priority 500. This pull request will be tested once the tree is reopened. |
Lol, bors closed this because of the "fixes" comment. |
@bors r=rcvalle just in case the rollup that this is a part of fails |
💡 This pull request was already approved, no need to approve it again.
|
🌲 The tree is currently closed for pull requests below priority 500. This pull request will be tested once the tree is reopened. |
@bors treeclosed- |
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#105903 (Unify id-based thread parking implementations) - rust-lang#106232 (CFI: Monomorphize transparent ADTs before typeid) - rust-lang#106248 (Revert "Implement allow-by-default `multiple_supertrait_upcastable` lint") - rust-lang#106286 (Make tidy errors red) - rust-lang#106295 (Extend scraped examples layout GUI test for position of buttons) - rust-lang#106305 ( bootstrap: Get rid of tail_args in stream_cargo) - rust-lang#106310 (Dont use `--merge-base` during bootstrap formatting subcommand) - rust-lang#106314 (Fix panic on `x build --help`) - rust-lang#106317 (Only deduplicate stack traces for good path bugs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
Monomorphise
#[repr(transparent)]
parameterized ADTs before turning them into an Itanium mangled String.#[repr(transparent)]
ADTs currently use the single field to represent them in their CFI type ID to ensure that they are compatible. However, if that type involves a type parameter instantiated at the ADT level, as inManuallyDrop
, this will currently ICE as theParameter
type cannot be mangled. Since this happens at lowering time, it should always be concrete after substitution.Fixes #106230