[commit: ghc] master: CheckUnload needs to look at revertible_caf_list (beaf8c3)

git at git.haskell.org git at git.haskell.org
Thu Nov 21 13:28:12 UTC 2013


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

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

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

commit beaf8c370a25fdba1eb5d4aca820ea4677ade062
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Thu Nov 21 12:25:30 2013 +0000

    CheckUnload needs to look at revertible_caf_list
    
    Retained CAFs must keep an object file alive.


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

beaf8c370a25fdba1eb5d4aca820ea4677ade062
 rts/CheckUnload.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
index d3fb893..8692dea 100644
--- a/rts/CheckUnload.c
+++ b/rts/CheckUnload.c
@@ -267,6 +267,13 @@ void checkUnload (StgClosure *static_objects)
       link = *STATIC_LINK(info, p);
   }
 
+  // CAFs on revertible_caf_list are not on static_objects
+  for (p = (StgClosure*)revertible_caf_list;
+       p != END_OF_STATIC_LIST;
+       p = ((StgIndStatic *)p)->static_link) {
+      checkAddress(addrs, p);
+  }
+
   for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
       searchHeapBlocks (addrs, generations[g].blocks);
       searchHeapBlocks (addrs, generations[g].large_objects);



More information about the ghc-commits mailing list