Skip to content

ICE: CFI dies on #[repr(transparent)] on a parameterized ADT (e.g. ManuallyDrop). #106230

Closed

Description

I've got a fix for this that I'll be uploading in a minute or two, I'm filing the issue to claim an issue number for the test.

Code

#[repr(transparent)]
pub struct Thin<T> (T);
pub fn foo() -> Thin<u8> {
  Thin(0)
}

Meta

rustc --version --verbose:

rustc 1.68.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.68.0-dev
LLVM version: 15.0.6

Error output

rustc -Zsanitizer=cfi -C lto --crate-type=rlib input.rs

error: internal compiler error: compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs:798:13: transform_ty: unexpected `Param(T/#0)`

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.68.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z sanitizer=cfi -C lto --crate-type rlib

query stack during panic:
end of query stack
error: aborting due to previous error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions