summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Session.hs
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2020-08-31 10:35:56 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-09 08:41:50 -0400
commitfd984d68e5ec4b04bc79395c099434e653eb1060 (patch)
tree9b3e3725cc82fbd8686f3e63ba5a62860afdcd58 /compiler/GHC/Driver/Session.hs
parenta566c83d4fc3a90b209b33131a2972ea53ec81b2 (diff)
downloadhaskell-fd984d68e5ec4b04bc79395c099434e653eb1060.tar.gz
rts: fix race condition in StgCRun
On windows the stack has to be allocated 4k at a time, otherwise we get a segfault. This is done by using a helper ___chkstk_ms that is provided by libgcc. The Haskell side already knows how to handle this but we need to do the same from STG. Previously we would drop the stack in StgRun but would only make it valid whenever the scheduler loop ran. This approach was fundamentally broken in that it falls apart when you take a signal from the OS. We see it less often because you initially get allocated a 1MB stack block which you have to blow past first. Concretely this means we must always keep the stack valid. Fixes #18601.
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
0 files changed, 0 insertions, 0 deletions