From ddd8dea08710d6ddefb40d7fb216080119bf3bbf Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 4 Jun 2008 10:54:58 +0000 Subject: fix pointer tagging bug in removeIndirections (fixes stableptr003) --- rts/Stable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.1