diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-11-17 11:51:19 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-19 11:57:36 -0500 |
commit | 098d50176a2521d08efe6fdbab0ede2b7419786a (patch) | |
tree | 41cb5f70f9d7fc55d4c931dd27e760a01b7a7838 /rts | |
parent | a7571a74df15585a48318267a3f8e995fa1270b2 (diff) | |
download | haskell-098d50176a2521d08efe6fdbab0ede2b7419786a.tar.gz |
nonmoving: Drop redundant write barrier on stack underflow
Previously we would push stack-carried return values to the new stack on
a stack overflow. While the precise reasoning for this barrier is
unfortunately lost to history, in hindsight I suspect it was prompted by
a missing barrier elsewhere (that has been since fixed).
Moreover, there the redundant barrier is actively harmful: the stack may
contain non-pointer values; blindly pushing these to the mark queue will
result in a crash. This is precisely what happened in the `stack003`
test. However, because of a (now fixed) deficiency in the test this
crash did not trigger on amd64.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Threads.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 8334c5a5ac..8b05dd7c50 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -723,16 +723,6 @@ threadStackUnderflow (Capability *cap, StgTSO *tso) barf("threadStackUnderflow: not enough space for return values"); } - IF_NONMOVING_WRITE_BARRIER_ENABLED { - // ensure that values that we copy into the new stack are marked - // for the nonmoving collector. Note that these values won't - // necessarily form a full closure so we need to handle them - // specially. - for (unsigned int i = 0; i < retvals; i++) { - updateRemembSetPushClosure(cap, (StgClosure *) old_stack->sp[i]); - } - } - memcpy(/* dest */ new_stack->sp - retvals, /* src */ old_stack->sp, /* size */ retvals * sizeof(W_)); |