rts: Handle SMALL_MUT_ARR_PTRS in checkClosure
authorÖmer Sinan Ağacan <omeragacan@gmail.com>
Sat, 9 Jun 2018 09:49:19 +0000 (12:49 +0300)
committerÖmer Sinan Ağacan <omeragacan@gmail.com>
Sat, 9 Jun 2018 09:49:19 +0000 (12:49 +0300)
rts/sm/Sanity.c

index 81e6922..e5a22fd 100644 (file)
@@ -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);