[Git][ghc/ghc][wip/supersven/StgRetBCO-struct] Sanity.c
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Sat Mar 25 15:14:15 UTC 2023
Sven Tennie pushed to branch wip/supersven/StgRetBCO-struct at Glasgow Haskell Compiler / GHC
Commits:
775ea030 by Sven Tennie at 2023-03-25T15:14:02+00:00
Sanity.c
- - - - -
2 changed files:
- rts/sm/Sanity.c
- rts/sm/Scav.c
Changes:
=====================================
rts/sm/Sanity.c
=====================================
@@ -125,7 +125,7 @@ checkStackFrame( StgPtr c )
case CATCH_RETRY_FRAME:
case CATCH_STM_FRAME:
case CATCH_FRAME:
- // small bitmap cases (<= 32 entries)
+ // small bitmap cases (<= 27 entries (32bit arch) or <= 58 entries (64bit arch))
case UNDERFLOW_FRAME:
case STOP_FRAME:
case RET_SMALL:
@@ -135,16 +135,14 @@ checkStackFrame( StgPtr c )
return 1 + size;
case RET_BCO: {
- // TODO: Adjust
- StgBCO *bco;
- uint32_t size;
- bco = (StgBCO *)*(c+1);
- size = BCO_BITMAP_SIZE(bco);
- checkLargeBitmap((StgPtr)c + 2, BCO_BITMAP(bco), size);
+ StgRetBCO* retBCO = (StgRetBCO*) c;
+ StgWord size;
+ size = BCO_BITMAP_SIZE(retBCO->bco);
+ checkLargeBitmap((StgPtr) &retBCO->args, BCO_BITMAP(retBCO->bco), size);
return 2 + size;
}
- case RET_BIG: // large bitmap (> 32 entries)
+ case RET_BIG: // large bitmap (> 27 entries (32bit arch) or > 58 entries (64bit arch))
size = GET_LARGE_BITMAP(&info->i)->size;
checkLargeBitmap((StgPtr)c + 1, GET_LARGE_BITMAP(&info->i), size);
return 1 + size;
=====================================
rts/sm/Scav.c
=====================================
@@ -1984,7 +1984,7 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
case RET_BCO: {
StgRetBCO* retBCO;
- StgWord size;
+ StgHalfWord size;
retBCO = (StgRetBCO *) p;
evacuate((StgClosure **) &retBCO->bco);
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/775ea03078b2bd1039458e7d1d9242d904523103
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/775ea03078b2bd1039458e7d1d9242d904523103
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/20230325/e3cdd645/attachment-0001.html>
More information about the ghc-commits
mailing list