ruby-changes:64252
From: Koichi <ko1@a...>
Date: Fri, 18 Dec 2020 08:27:38 +0900 (JST)
Subject: [ruby-changes:64252] 29e42b8bfd (master): add explicit check
https://git.ruby-lang.org/ruby.git/commit/?id=29e42b8bfd From 29e42b8bfdfc7a2d879a4ddb1db3d4453d66143a Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Fri, 18 Dec 2020 08:25:24 +0900 Subject: add explicit check To debug this issue: https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20201217T220004Z.fail.html.gz diff --git a/gc.c b/gc.c index f6bfaf6..f59ac6a 100644 --- a/gc.c +++ b/gc.c @@ -8439,12 +8439,12 @@ gc_enter_count(enum gc_enter_event event) https://github.com/ruby/ruby/blob/trunk/gc.c#L8439 static inline void gc_enter(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_lev) { - // stop other ractors RB_VM_LOCK_ENTER_LEV(lock_lev); switch (event) { case gc_enter_event_start: case gc_enter_event_mark_continue: + // stop other ractors rb_vm_barrier(); break; default: @@ -8452,7 +8452,7 @@ gc_enter(rb_objspace_t *objspace, enum gc_enter_event event, unsigned int *lock_ https://github.com/ruby/ruby/blob/trunk/gc.c#L8452 } gc_enter_count(event); - GC_ASSERT(during_gc == 0); + if (UNLIKELY(during_gc != 0)) rb_bug("during_gc != 0"); if (RGENGC_CHECK_MODE >= 3) gc_verify_internal_consistency(objspace); mjit_gc_start_hook(); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/