-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
ICE (stable segfault) in LLVM with creative FFI types #54410
Copy link
Copy link
Closed
rust-lang/cargo
#6176Closed
Copy link
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-codegenArea: Code generationArea: Code generationA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-FFIArea: Foreign function interface (FFI)Area: Foreign function interface (FFI)A-codegenArea: Code generationArea: Code generationA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Found this while experimenting with the right FFI type to declare a
char[](notchar *) symbol in anextern "C"block. Credit to @acfoltzer for the original code sample that I tweaked to end up with this error. This produces an ICE on nightly, or a segfault on stable.rustc 1.30.0-nightly (20dc0c507 2018-09-19)Code:
Result: