-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemI-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
This program segfaults when trying to run the destructor for "a". "b"'s destructor runs first and prints 2, then "a"'s destructor tries to access a zeroed-out ARC.
use extra::arc::*;
struct A { y: ARC<int>, x: ARC<int> }
impl Drop for A {
fn finalize(&self) { println(fmt!("x=%?", self.x.get())); }
}
fn main() {
let a = A { y: ARC(1), x: ARC(2) };
let _b = A { y: ARC(3), ..a };
}
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemI-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.