-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
ICE (ish): Segfault with the following code #59184
Copy link
Copy link
Closed
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When trying to compile the code below in a file
asm.rs, the Rust compiler segfaults (Segmentation Fault 11).Example command line:-
(The presence of the
--editiontag seems irrelevant).When asking for LLVM IR output, a segfault does not occur, eg
rustc --emit llvm-ir -o asm.ir -v --edition=2018 asm.rs.The segfault also does not happen if the call to
read_after_raising_any_exceptions()is removed from main. It's possible my assembler is mis-formed, but that's not completely germane - the compiler should not segfault.Version details from
rustc -V:rustc 1.35.0-nightly (719b0d984 2019-03-13)OS: Mac OS 10.14.2 , running on a Mac Pro trashcan.
Rust code:-