Closed
Description
#![feature(abi_x86_interrupt)]
#[repr(C)]
pub struct Context<'a> {
inner: &'a mut u8,
}
extern "x86-interrupt" fn isr(_: Context) { }
pub fn main() {
println!("oops: {:x}", isr as usize);
}
yields
> rustc crash.rs
Segmentation fault (core dumped)
Interestingly, it seems like #[repr(C)]
is load-bearing? No crash without a repr
on the argument type. Also no crash if the argument is zero-sized (even with #[repr(C)]
).
Metadata
Metadata
Assignees
Labels
Area: Code generationCategory: This is a bug.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Target: x86 processors, 32 bit (like i686-*) (IA-32)Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.