[commit: ghc] master: rts: Handle SMALL_MUT_ARR_PTRS in checkClosure (9976bed)

git at git.haskell.org git at git.haskell.org
Sat Jun 9 09:50:15 UTC 2018


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

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

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

commit 9976bed24dda9449ac2e3e95fb4bf8b379114a28
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Sat Jun 9 12:49:19 2018 +0300

    rts: Handle SMALL_MUT_ARR_PTRS in checkClosure


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

9976bed24dda9449ac2e3e95fb4bf8b379114a28
 rts/sm/Sanity.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c
index 81e6922..e5a22fd 100644
--- a/rts/sm/Sanity.c
+++ b/rts/sm/Sanity.c
@@ -391,6 +391,18 @@ checkClosure( const StgClosure* p )
             return mut_arr_ptrs_sizeW(a);
         }
 
+    case SMALL_MUT_ARR_PTRS_CLEAN:
+    case SMALL_MUT_ARR_PTRS_DIRTY:
+    case SMALL_MUT_ARR_PTRS_FROZEN_CLEAN:
+    case SMALL_MUT_ARR_PTRS_FROZEN_DIRTY:
+        {
+            StgSmallMutArrPtrs *a = (StgSmallMutArrPtrs *)p;
+            for (uint32_t i = 0; i < a->ptrs; i++) {
+                ASSERT(LOOKS_LIKE_CLOSURE_PTR(a->payload[i]));
+            }
+            return small_mut_arr_ptrs_sizeW(a);
+        }
+
     case TSO:
         checkTSO((StgTSO *)p);
         return sizeofW(StgTSO);



More information about the ghc-commits mailing list