Fix it
authorBen Gamari <ben@smart-cactus.org>
Tue, 5 Mar 2019 05:07:06 +0000 (00:07 -0500)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Wed, 6 Mar 2019 20:53:32 +0000 (15:53 -0500)
rts/sm/Compact.c
rts/sm/Compact.h
rts/sm/GC.c

index bd45489..77523ae 100644 (file)
@@ -940,7 +940,9 @@ update_bkwd_compact( generation *gen )
 }
 
 void
-compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurrected_threads)
+compact(StgClosure *static_objects,
+        StgWeak **dead_weak_ptr_list,
+        StgTSO **resurrected_threads)
 {
     W_ n, g, blocks;
     generation *gen;
@@ -958,7 +960,7 @@ compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurre
     }
 
     if (dead_weak_ptr_list != NULL) {
-        thread((void *)&dead_weak_ptr_list); // tmp
+        thread((void *)dead_weak_ptr_list); // tmp
     }
 
     // mutable lists
@@ -981,7 +983,7 @@ compact(StgClosure *static_objects, StgWeak *dead_weak_ptr_list, StgTSO *resurre
     }
 
     // any threads resurrected during this GC
-    thread((void *)&resurrected_threads);
+    thread((void *)resurrected_threads);
 
     // the task list
     {
index ba39c30..570de7a 100644 (file)
@@ -46,7 +46,7 @@ is_marked(StgPtr p, bdescr *bd)
 }
 
 void compact (StgClosure *static_objects,
-              StgWeak *dead_weak_ptr_list,
-              StgTSO *resurrected_threads);
+              StgWeak **dead_weak_ptr_list,
+              StgTSO **resurrected_threads);
 
 #include "EndPrivate.h"
index b3cc448..0544fd2 100644 (file)
@@ -473,7 +473,9 @@ GarbageCollect (uint32_t collect_gen,
   // Finally: compact or sweep the oldest generation.
   if (major_gc && oldest_gen->mark) {
       if (oldest_gen->compact)
-          compact(gct->scavenged_static_objects, dead_weak_ptr_list, resurrected_threads);
+          compact(gct->scavenged_static_objects,
+                  &dead_weak_ptr_list,
+                  &resurrected_threads);
       else
           sweep(oldest_gen);
   }