1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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`.
This commit is contained in:
Peter Zhu 2021-06-28 14:44:22 -04:00
parent 5e75280c8e
commit 03dc664493
Notes: git 2021-06-29 22:28:28 +09:00

2
gc.c
View file

@ -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
{