Fix for a bug in +RTS -qi (crash in zero_static_object_list)
authorSimon Marlow <marlowsd@gmail.com>
Tue, 13 Dec 2011 13:03:23 +0000 (13:03 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 13 Dec 2011 15:02:11 +0000 (15:02 +0000)
rts/sm/GC.c

index 993de51..aeadf6f 100644 (file)
@@ -651,7 +651,9 @@ GarbageCollect (rtsBool force_major_gc,
           zero_static_object_list(gct->scavenged_static_objects);
       } else {
           for (i = 0; i < n_gc_threads; i++) {
-              zero_static_object_list(gc_threads[i]->scavenged_static_objects);
+              if (!gc_threads[i]->idle) {
+                  zero_static_object_list(gc_threads[i]->scavenged_static_objects);
+              }
           }
       }
   }