diff options
author | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-23 18:02:24 +0900 |
---|---|---|
committer | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-26 15:59:40 +0900 |
commit | 3ba485c0bfcfc0be351ef8278cd27187f4c11906 (patch) | |
tree | ff2f2e6d7ab232123230bd33bdb1aca470c72ac3 /gc.c | |
parent | 504ce460d240b5b726e77c0b0915677892a19e58 (diff) | |
download | ruby-3ba485c0bfcfc0be351ef8278cd27187f4c11906.tar.gz |
zero-fill before GC mark
Depending on architectures, setjmp might not fully fill a jmp_buf.
On such machines the union can contain wobbly bits. They are then
scanned during mark_locations_array(). This is bad.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4598,6 +4598,7 @@ mark_current_machine_context(rb_objspace_t *objspace, rb_execution_context_t *ec VALUE *stack_start, *stack_end; FLUSH_REGISTER_WINDOWS; + memset(&save_regs_gc_mark, 0, sizeof(save_regs_gc_mark)); /* This assumes that all registers are saved into the jmp_buf (and stack) */ rb_setjmp(save_regs_gc_mark.j); |