[Git][ghc/ghc][wip/memory-barriers] Fix weaks

Ben Gamari gitlab at gitlab.haskell.org
Sat Jun 8 20:24:53 UTC 2019



Ben Gamari pushed to branch wip/memory-barriers at Glasgow Haskell Compiler / GHC


Commits:
37fb6754 by Ben Gamari at 2019-06-08T20:23:55Z
Fix weaks

- - - - -


1 changed file:

- rts/sm/MarkWeak.c


Changes:

=====================================
rts/sm/MarkWeak.c
=====================================
@@ -234,7 +234,7 @@ static bool tidyWeakList(generation *gen)
     last_w = &gen->old_weak_ptr_list;
     for (w = gen->old_weak_ptr_list; w != NULL; w = next_w) {
 
-        info = get_itbl((StgClosure *)w);
+        info = w->header.info;
         load_load_barrier();
 
         /* There might be a DEAD_WEAK on the list if finalizeWeak# was
@@ -246,6 +246,7 @@ static bool tidyWeakList(generation *gen)
             continue;
         }
 
+        info = INFO_PTR_TO_STRUCT(info);
         switch (info->type) {
 
         case WEAK:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/37fb6754b2d9bbe752114f02f942cf8be990ef1f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/37fb6754b2d9bbe752114f02f942cf8be990ef1f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190608/08354717/attachment.html>


More information about the ghc-commits mailing list