Closed
Description
Probably related to #9127 (or at least the stack traces look similar to me):
CFG_CONFIGURE_ARGS := --enable-debug --disable-optimize --enable-ccache --enable-clang --prefix=~/opt/rust-dbg-nopt
% x86_64-apple-darwin/stage2/bin/rustc --cfg stage2 --cfg debug -Z no-debug-borrows --target=x86_64-apple-darwin --lib -o x86_64-apple-darwin/stage2/lib/rustc/x86_64-apple-darwin/lib/librun_pass_stage2.dylib tmp/run_pass_stage2.rc
Bus error: 10
Update: Here is a isolated test case (importantly, it does not depend on pulling in libsyntax
):
pub trait bomb { fn boom(@self, Ident); }
pub struct S;
impl bomb for S { fn boom(@self, _: Ident) { } }
pub struct Ident { name: uint }
// macro_rules! int3( () => ( unsafe { asm!( "int3" ); } ) )
macro_rules! int3( () => ( { } ) )
fn Ident_new() -> Ident {
int3!();
Ident {name: 0x6789ABCD }
}
pub fn light_fuse(fld: @bomb) {
int3!();
let f = || {
int3!();
fld.boom(Ident_new()); // *** 1
};
f();
}
fn main() {
let b = @S as @bomb;
light_fuse(b);
}