diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-05 06:20:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-05 06:20:43 -0800 |
commit | ca114c442d68f59775194d66894923bd517980cb (patch) | |
tree | 2098b1c63bc293690cc00799b2a12ccfd0c48327 /unwind.c | |
parent | 33719b3b1101faef84ca091540caffb652b9d0dd (diff) | |
download | txr-ca114c442d68f59775194d66894923bd517980cb.tar.gz txr-ca114c442d68f59775194d66894923bd517980cb.tar.bz2 txr-ca114c442d68f59775194d66894923bd517980cb.zip |
Clear stack area below revived continuation.
* unwind.c (revive_cont): Don't just reserve frame_slack
bytes below the continuation for any stack frame, but
clear the bytes to zero. On Cygwin, this fixes a failing
continuation test case. The issue is that the cont_obj
variable in capture_cont lands into this area (implying
it is not captured). When the continuation is revived,
the variable has a garbage value, rather than nil,
as expected.
Diffstat (limited to 'unwind.c')
-rw-r--r-- | unwind.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -744,6 +744,7 @@ static val revive_cont(val dc, val arg) uw_frame_t *new_uw_stack = coerce(uw_frame_t *, space), *fr; int env_set = 0; + memset(space - frame_slack, 0, frame_slack); memcpy(space, cont->stack, cont->size); for (ptr = space; ptr < space + cont->size; ptr += sizeof (cnum)) |