Don't call processHeapClosureForDead on pinned blocks
[ghc-hetmet.git] / rts / LdvProfile.c
index 6a807cf..eab3ec3 100644 (file)
@@ -266,7 +266,9 @@ processChainForDead( bdescr *bd )
 {
     // Any object still in the chain is dead!
     while (bd != NULL) {
-       processHeapClosureForDead((StgClosure *)bd->start);
+        if (!(bd->flags & BF_PINNED)) {
+            processHeapClosureForDead((StgClosure *)bd->start);
+        }
        bd = bd->link;
     }
 }