Blocking MVar# primops not performing stack checks?

Shao, Cheng cheng.shao at
Wed Feb 26 15:02:19 UTC 2020

Hi all,

When an MVar# primop blocks, it jumps to a function in
HeapStackCheck.cmm which pushes a RET_SMALL stack frame before
returning to the scheduler (e.g. the takeMVar# primop jumps to
stg_block_takemvar for stack adjustment). But these functions directly
bump Sp without checking for possible stack overflow, I wonder if it
is a bug?


More information about the ghc-devs mailing list