[project @ 2003-03-10 13:27:34 by simonmar]
authorsimonmar <unknown>
Mon, 10 Mar 2003 13:27:34 +0000 (13:27 +0000)
committersimonmar <unknown>
Mon, 10 Mar 2003 13:27:34 +0000 (13:27 +0000)
commitbda047d0f4dce1de599938457d8f31a97cb36f5b
tree1f0ffa5a01cc36153b9f26d7f952c18abde62038
parent4e25c0456ad19a3f0f7406c1c7b88a1327282743
[project @ 2003-03-10 13:27:34 by simonmar]
Use STK_CHK_NP rather than STK_CHK_GEN in the entry code for AP and
AP_STACK thunks.

The reason is that if the check fails, on return the closure might
have been blackholed (perhaps due to lazy blackholing, or even because
another thread has entered it), so we *must* enter the closure to
continue, rather than just continuing at the original entry point.

All compiler-generated thunks do this anyway, I think these are the
only cases of thunks which don't follow the rule.

Thanks to Robert Ennals for spotting, and correctly diagnosing, the
bug.
ghc/rts/Apply.hc