diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 13:09:09 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 13:10:39 +0000 |
commit | 9b6e931574992913fbb6a5e537abdb088c3da4f2 (patch) | |
tree | cff671c324079f4d7620458b8e6559db9da58134 /rts/sm | |
parent | 88b4578bc82795de48876a250c2b6d7cce380628 (diff) | |
download | haskell-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')
-rw-r--r-- | rts/sm/GCAux.c | 8 |
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; |