[commit: ghc] master: Fix processHeapClosureForDead CONSTR_NOCAF case: (a303584)

git at git.haskell.org git at git.haskell.org
Fri Apr 13 16:07:11 UTC 2018


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

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

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

commit a303584e58b3f4791bc5881cb722e7f498e14554
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Fri Apr 13 11:31:56 2018 -0400

    Fix processHeapClosureForDead CONSTR_NOCAF case:
    
    CONSTR_NOCAF was introduced with 55d535da10d as a replacement for
    CONSTR_STATIC and CONSTR_NOCAF_STATIC, however, as explained in Note
    [static constructors], we copy CONSTR_NOCAFs (which can also be seen in
    evacuate) during GC, and they can become dead, like other CONSTR_X_Ys.
    processHeapClosureForDead is updated to reflect this.
    
    Reviewers: bgamari, simonmar, erikd
    
    Subscribers: thomie, carter
    
    GHC Trac Issues: #7836
    
    Differential Revision: https://phabricator.haskell.org/D4567


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

a303584e58b3f4791bc5881cb722e7f498e14554
 rts/LdvProfile.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index 7899416..7cf9ceb 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -101,6 +101,7 @@ processHeapClosureForDead( const StgClosure *c )
     case CONSTR_2_0:
     case CONSTR_1_1:
     case CONSTR_0_2:
+    case CONSTR_NOCAF:
     case FUN:
     case FUN_1_0:
     case FUN_0_1:
@@ -130,7 +131,6 @@ processHeapClosureForDead( const StgClosure *c )
     case IND_STATIC:
     case FUN_STATIC:
     case THUNK_STATIC:
-    case CONSTR_NOCAF:
         // stack objects
     case UPDATE_FRAME:
     case CATCH_FRAME:
@@ -139,6 +139,9 @@ processHeapClosureForDead( const StgClosure *c )
     case RET_BCO:
     case RET_SMALL:
     case RET_BIG:
+    case CATCH_STM_FRAME:
+    case CATCH_RETRY_FRAME:
+    case ATOMICALLY_FRAME:
         // others
     case INVALID_OBJECT:
     case COMPACT_NFDATA:



More information about the ghc-commits mailing list