From c32218de1ba094223420a4ea017707f48d0009c5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 25 Nov 2020 09:24:50 -0800 Subject: Disable auto compaction on platforms that can't support it Both explicit compaction routines (gc_compact and the verify references form) need to clear the heap before executing compaction. Otherwise some objects may not be alive, and we'll need the read barrier. The heap must only contain *live* objects if we want to disable the read barrier during explicit compaction. The previous commit was missing the "clear the heap" phase from the "verify references" explicit compaction function. Fixes [Bug #17306] --- gc.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gc.rb') diff --git a/gc.rb b/gc.rb index d2b0d8e86e..4e0faaf00d 100644 --- a/gc.rb +++ b/gc.rb @@ -199,8 +199,7 @@ module GC end def self.compact - Primitive.gc_start_internal true, true, true, true - Primitive.gc_compact_stats + Primitive.gc_compact end # call-seq: -- cgit v1.2.1