summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc_compact.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-05-23 11:21:16 +0900
committerKoichi Sasada <ko1@atdot.net>2019-05-23 11:26:33 +0900
commit136ae55892ae120bb94e4ff2d025c745fdaa1091 (patch)
treea2aa5d724bfc1973517d190706edf06232fc53f4 /test/ruby/test_gc_compact.rb
parent0eff21af8d03a9d2b881b9cce963262da3d952dc (diff)
Do not kick finalizers on rb_gc().
rb_gc() kicks gc_finalize_deferred(), which invokes finalizers. This means that any Ruby program can be run this point and it may be thread switching points and so on. However, it is difficult to think it invokes any Ruby programs. For example, `GC.compact` use `rb_gc()` to implement it, howver, any Ruby program must not be run on this timing. For this reason (it is difficult to image it run any Ruby program), I removed `gc_finalize_deferred()` line in rb_gc(). This patch solves GC.compact issue. [Bug #15809] and re-enable GC.compact test.
Diffstat (limited to 'test/ruby/test_gc_compact.rb')
-rw-r--r--test/ruby/test_gc_compact.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index d2b2c1bb47..5669fd3d6a 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -2,8 +2,6 @@
require 'test/unit'
require 'fiddle'
-return
-
class TestGCCompact < Test::Unit::TestCase
def memory_location(obj)
(Fiddle.dlwrap(obj) >> 1)