diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-12-18 01:19:03 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-12-18 01:20:02 +0900 |
commit | 6538c89f1c9d1af95c0fb3e58ac0e807a5fe47f4 (patch) | |
tree | 6a40f7026168022640f0893919256fc938aca99e /gc.c | |
parent | caef364cc5e9816b398f46a7da50057707f87af3 (diff) |
gc_verify_internal_consistency() needs barrier
gc_verify_internal_consistency() accesses all slots (objects) so
all ractors should stop before starting this function.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -7059,7 +7059,6 @@ gc_verify_heap_pages(rb_objspace_t *objspace) static VALUE gc_verify_internal_consistency_m(VALUE dummy) { - ASSERT_vm_locking(); gc_verify_internal_consistency(&rb_objspace); return Qnil; } @@ -7143,6 +7142,9 @@ gc_verify_internal_consistency_(rb_objspace_t *objspace) static void gc_verify_internal_consistency(rb_objspace_t *objspace) { + ASSERT_vm_locking(); + rb_vm_barrier(); // stop other ractors + unsigned int prev_during_gc = during_gc; during_gc = FALSE; // stop gc here { |