diff options
author | Peter Zhu <[email protected]> | 2021-06-28 14:44:22 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2021-06-29 09:28:07 -0400 |
commit | 03dc66449326ce0945c1ccad7f51e57125b2b854 (patch) | |
tree | 17343250736e77651186f646cf72e1aa63205dca /gc.c | |
parent | 5e75280c8edcd0f3c8f79d0c532cbfd18074886a (diff) |
Fix crash on RGENGC_CHECK_MODE=4
When running btest there is a crash when compiled with
RGENGC_CHECK_MODE=4. The crash happens because `during_gc` is not
turned off before `gc_marks_check` is called, causing the marking to
happen on the main mark stack instead of mark stack created in
`objspace_allrefs`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4610
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -7977,7 +7977,9 @@ gc_marks_finish(rb_objspace_t *objspace) } #if RGENGC_CHECK_MODE >= 4 + during_gc = FALSE; gc_marks_check(objspace, gc_check_after_marks_i, "after_marks"); + during_gc = TRUE; #endif { |