diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-09-11 13:02:28 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-09-11 13:02:28 +0000 |
commit | 066f10289f9711a0f6d0669aea97e134f1be2826 (patch) | |
tree | f5b07282067007e3791602c1a471c9889b94e20e /rts/Apply.cmm | |
parent | dbbfdcaa31e71ec36566ce14640f297ecc699a3f (diff) | |
download | haskell-066f10289f9711a0f6d0669aea97e134f1be2826.tar.gz |
FIX #1466 (partly), which was causing concprog001(ghci) to fail
An AP_STACK now ensures that there is at least AP_STACK_SPLIM words of
stack headroom available after unpacking the payload. Continuations
that require more than AP_STACK_SPLIM words of stack must do their own
stack checks instead of aggregating their stack usage into the parent
frame. I have made this change for the interpreter, but not for
compiled code yet - we should do this in the glorious rewrite of the
code generator.
Diffstat (limited to 'rts/Apply.cmm')
-rw-r--r-- | rts/Apply.cmm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/Apply.cmm b/rts/Apply.cmm index c9c7daa9ac..0498f009b8 100644 --- a/rts/Apply.cmm +++ b/rts/Apply.cmm @@ -249,7 +249,9 @@ INFO_TABLE(stg_AP_STACK,/*special layout*/0,0,AP_STACK,"AP_STACK","AP_STACK") * closure, in which case we must enter the blackhole on return rather * than continuing to evaluate the now-defunct closure. */ - STK_CHK_NP(WDS(Words) + SIZEOF_StgUpdateFrame); + STK_CHK_NP(WDS(Words) + SIZEOF_StgUpdateFrame + WDS(AP_STACK_SPLIM)); + /* ensure there is at least AP_STACK_SPLIM words of headroom available + * after unpacking the AP_STACK. See bug #1466 */ PUSH_UPD_FRAME(Sp - SIZEOF_StgUpdateFrame, R1); Sp = Sp - SIZEOF_StgUpdateFrame - WDS(Words); |