summaryrefslogtreecommitdiff
path: root/rts/Stable.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-06-04 10:54:58 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-06-04 10:54:58 +0000
commitddd8dea08710d6ddefb40d7fb216080119bf3bbf (patch)
tree539f1cc3985b162e72686bea78f4d5ca62c1a048 /rts/Stable.c
parentbf0ab2d94f23d5295c43fd87844fccd47a1fdfd7 (diff)
downloadhaskell-ddd8dea08710d6ddefb40d7fb216080119bf3bbf.tar.gz
fix pointer tagging bug in removeIndirections (fixes stableptr003)
Diffstat (limited to 'rts/Stable.c')
-rw-r--r--rts/Stable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/Stable.c b/rts/Stable.c
index 0ed18bcec2..a6b8ddf738 100644
--- a/rts/Stable.c
+++ b/rts/Stable.c
@@ -195,9 +195,11 @@ removeIndirections(StgClosure* p)
get_itbl(q)->type == IND_OLDGEN ||
get_itbl(q)->type == IND_PERM ||
get_itbl(q)->type == IND_OLDGEN_PERM ) {
+ q = ((StgInd *)q)->indirectee;
tag = GET_CLOSURE_TAG(q);
- q = UNTAG_CLOSURE(((StgInd *)q)->indirectee);
+ q = UNTAG_CLOSURE(q);
}
+
return TAG_CLOSURE(tag,q);
}