diff options
| author | Elliott Slaughter <eslaughter@mozilla.com> | 2012-08-22 16:55:48 -0700 |
|---|---|---|
| committer | Elliott Slaughter <eslaughter@mozilla.com> | 2012-09-07 09:21:21 -0700 |
| commit | 88f5ab31635855595e4053cb64153e6bb7ec622b (patch) | |
| tree | 58fe7723e1e40bf4e0837f28af54bc3e2b25a52d /src | |
| parent | 3405c548e8f65c9955dfc89188f3cd9db4432bba (diff) | |
| download | rust-88f5ab31635855595e4053cb64153e6bb7ec622b.tar.gz rust-88f5ab31635855595e4053cb64153e6bb7ec622b.zip | |
gc: Fix for deallocating resources on the shared heap while cleaning stack.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/gc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/gc.rs b/src/libcore/gc.rs index 697c6fcdfb4..741fa4de122 100644 --- a/src/libcore/gc.rs +++ b/src/libcore/gc.rs @@ -113,7 +113,8 @@ unsafe fn walk_gc_roots(mem: Memory, visitor: Visitor) { let refcount = **root; if mem | task_local_heap != 0 && refcount != -1 { if !visitor(root, tydesc) { return; } - } else if mem | exchange_heap != 0 { + } else if mem | exchange_heap != 0 + && refcount == -1 { if !visitor(root, tydesc) { return; } } } else { |
