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:
parent
5e75280c8e
commit
03dc664493
Notes:
git
2021-06-29 22:28:28 +09:00
1 changed files with 2 additions and 0 deletions
2
gc.c
2
gc.c
|
@ -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
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue