ruby-changes:56411
From: Aaron <ko1@a...>
Date: Thu, 11 Jul 2019 03:37:22 +0900 (JST)
Subject: [ruby-changes:56411] Aaron Patterson: 12762b76cb (master): Don't manipulate GC flags directly
https://git.ruby-lang.org/ruby.git/commit/?id=12762b76cb From 12762b76cba8ac4623a6c16e1fe60efafa3b7d1c Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 10 Jul 2019 11:12:28 -0500 Subject: Don't manipulate GC flags directly We need to disable the GC around compaction (for now) because object id book keeping can cause malloc to happen and that can trigger GC. diff --git a/gc.c b/gc.c index 2b7b039..2268dd7 100644 --- a/gc.c +++ b/gc.c @@ -8217,9 +8217,9 @@ gc_compact(rb_objspace_t *objspace, int use_toward_empty, int use_double_pages, https://github.com/ruby/ruby/blob/trunk/gc.c#L8217 /* pin objects referenced by maybe pointers */ rb_gc(); /* compact */ - during_gc = TRUE; + rb_gc_disable(); gc_compact_after_gc(objspace, use_toward_empty, use_double_pages, TRUE); - during_gc = FALSE; + rb_gc_enable(); } objspace->flags.during_compacting = FALSE; return gc_compact_stats(objspace); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/