isAlive: re-apply the tag if we find a forwarding pointer. This is a
authorSimon Marlow <marlowsd@gmail.com>
Tue, 12 Apr 2011 08:41:01 +0000 (09:41 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 12 Apr 2011 08:41:23 +0000 (09:41 +0100)
real bug, spotted by Marcin Orczyk (thanks!).  I'm not sure if it lead
to any actual crashes.

rts/sm/GCAux.c

index 7f3968f..12e106b 100644 (file)
@@ -79,7 +79,7 @@ isAlive(StgClosure *p)
 
     if (IS_FORWARDING_PTR(info)) {
         // alive! 
-        return (StgClosure*)UN_FORWARDING_PTR(info);
+        return TAG_CLOSURE(tag,(StgClosure*)UN_FORWARDING_PTR(info));
     }
 
     info = INFO_PTR_TO_STRUCT(info);