Skip to content

Commit 0b30924

Browse files
author
Elliott Slaughter
committed
---
yaml --- r: 23776 b: refs/heads/master c: 3405c54 h: refs/heads/master v: v3
1 parent c4839f7 commit 0b30924

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9ea4afe5daf359c7022057774f943645d0d32043
2+
refs/heads/master: 3405c548e8f65c9955dfc89188f3cd9db4432bba
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/gc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ unsafe fn walk_gc_roots(mem: Memory, visitor: Visitor) {
102102
match sp {
103103
Some(sp_info) => {
104104
for walk_safe_point(frame.fp, sp_info) |root, tydesc| {
105+
// Skip null pointers, which can occur when a
106+
// unique pointer has already been freed.
107+
if ptr::is_null(*root) {
108+
again;
109+
}
110+
105111
if ptr::is_null(tydesc) {
106112
// Root is a generic box.
107113
let refcount = **root;

0 commit comments

Comments
 (0)