summaryrefslogtreecommitdiff
path: root/rts/sm/GCAux.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-02-14 13:09:09 +0000
committerSimon Marlow <marlowsd@gmail.com>2013-02-14 13:10:39 +0000
commit9b6e931574992913fbb6a5e537abdb088c3da4f2 (patch)
treecff671c324079f4d7620458b8e6559db9da58134 /rts/sm/GCAux.c
parent88b4578bc82795de48876a250c2b6d7cce380628 (diff)
downloadhaskell-9b6e931574992913fbb6a5e537abdb088c3da4f2.tar.gz
isAlive needs to look through BLACKHOLE indirections
This has been breaking StableNames and possibly weak pointers in some cases.
Diffstat (limited to 'rts/sm/GCAux.c')
-rw-r--r--rts/sm/GCAux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/sm/GCAux.c b/rts/sm/GCAux.c
index 3df36d7449..29c1e9d604 100644
--- a/rts/sm/GCAux.c
+++ b/rts/sm/GCAux.c
@@ -93,6 +93,14 @@ isAlive(StgClosure *p)
p = ((StgInd *)q)->indirectee;
continue;
+ case BLACKHOLE:
+ p = ((StgInd*)q)->indirectee;
+ if (GET_CLOSURE_TAG(p) != 0) {
+ continue;
+ } else {
+ return NULL;
+ }
+
default:
// dead.
return NULL;