[commit: ghc] master: Fix it (a4944d8)

git at git.haskell.org git at git.haskell.org
Wed Mar 6 21:49:55 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a4944d8d98770b869f6aa5fb667877c56c3f8825/ghc

>---------------------------------------------------------------

commit a4944d8d98770b869f6aa5fb667877c56c3f8825
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Mar 5 00:07:06 2019 -0500

    Fix it


>---------------------------------------------------------------

a4944d8d98770b869f6aa5fb667877c56c3f8825
 rts/sm/Compact.c | 8 +++++---
 rts/sm/Compact.h | 4 ++--
 rts/sm/GC.c      | 4 +++-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c
index bd45489..77523ae 100644
--- a/rts/sm/Compact.c
+++ b/rts/sm/Compact.c
@@ -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
     {
diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h
index ba39c30..570de7a 100644
--- a/rts/sm/Compact.h
+++ b/rts/sm/Compact.h
@@ -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"
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index b3cc448..0544fd2 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -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);
   }



More information about the ghc-commits mailing list