marking requires a barrier (stop all Ractors) and gc_enter() does it.
However, it doesn't check rest event which can start marking.
[Bug #17599]
This commit is contained in:
Koichi Sasada 2021-02-18 15:47:32 +09:00
Родитель 42a16e5974
Коммит 969b824a0c
1 изменённых файлов: 3 добавлений и 0 удалений

3
gc.c
Просмотреть файл

@ -8477,6 +8477,9 @@ gc_enter(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_
RB_VM_LOCK_ENTER_LEV(lock_lev);
switch (event) {
case gc_enter_event_rest:
if (!is_marking(objspace)) break;
// fall through
case gc_enter_event_start:
case gc_enter_event_mark_continue:
// stop other ractors