-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-codegenArea: Code generationArea: Code generationI-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.
Description
Here's the output of a shell session on 32-bit linux which causes the failure.
[~/rust[uv-rewrite]] $ cat foo.c
enum A {
B, C
};
enum A foo() { return B; }
[~/rust[uv-rewrite]] $ gcc -m32 foo.c -c -o foo.o
[~/rust[uv-rewrite]] $ ar rcs libfoo.a foo.o
[~/rust[uv-rewrite]] $ cat foo.rs
#[allow(cstack)];
#[repr(C)]
enum A {
B, C
}
#[link_args = "-lfoo"]
extern {
fn foo() -> A;
}
fn main() {
unsafe { foo(); }
}
[~/rust[uv-rewrite]] $ ./i686-unknown-linux-gnu/stage2/bin/rustc foo.rs
[~/rust[uv-rewrite]] $ ./foo
zsh: segmentation fault (core dumped) ./foo
cc @jld
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationI-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.