ruby-changes:63421
From: Takashi <ko1@a...>
Date: Fri, 23 Oct 2020 13:59:34 +0900 (JST)
Subject: [ruby-changes:63421] 40bad72f31 (master): Assert in_gc >= 0 instead of guarding it (#3687)
https://git.ruby-lang.org/ruby.git/commit/?id=40bad72f31 From 40bad72f31248c48048249b1d7536e87b4994664 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 22 Oct 2020 21:59:13 -0700 Subject: Assert in_gc >= 0 instead of guarding it (#3687) diff --git a/mjit.c b/mjit.c index ab74a06..c3e2a5d 100644 --- a/mjit.c +++ b/mjit.c @@ -109,9 +109,7 @@ mjit_gc_exit_hook(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L109 return; CRITICAL_SECTION_START(4, "mjit_gc_exit_hook"); in_gc--; - if (in_gc < 0) { // Don't allow underflow - in_gc = 0; - } + RUBY_ASSERT_ALWAYS(in_gc >= 0); if (!in_gc) { verbose(4, "Sending wakeup signal to workers after GC"); rb_native_cond_broadcast(&mjit_gc_wakeup); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/