diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-14 18:05:15 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-14 18:05:15 -0700 |
| commit | 1c5db46f8e44441ba1aa11f0f607b7c015fd1fa5 (patch) | |
| tree | 287b71fc121db19d09a04fb4f3998d8affe0de39 /src/libcore | |
| parent | 24c89693f0556ba4b455df358a9136f7873776bf (diff) | |
rustc: Call the box annihilator in main
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cleanup.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/cleanup.rs b/src/libcore/cleanup.rs index 4fdd6ae8150..53c5648c96d 100644 --- a/src/libcore/cleanup.rs +++ b/src/libcore/cleanup.rs @@ -71,13 +71,13 @@ struct Task { #[lang="annihilate"] pub unsafe fn annihilate() { use rt::rt_free; + use io::WriterUtil; let task: *Task = transmute(rustrt::rust_get_task()); // Pass 1: Make all boxes immortal. let box = (*task).boxed_region.live_allocs; let mut box: *mut BoxRepr = transmute(copy box); - assert (*box).prev == null(); while box != mut_null() { debug!("making box immortal: %x", box as uint); (*box).ref_count = 0x77777777; @@ -87,7 +87,6 @@ pub unsafe fn annihilate() { // Pass 2: Drop all boxes. let box = (*task).boxed_region.live_allocs; let mut box: *mut BoxRepr = transmute(copy box); - assert (*box).prev == null(); while box != mut_null() { debug!("calling drop glue for box: %x", box as uint); let tydesc: *TypeDesc = transmute(copy (*box).type_desc); |
