[前][次][番号順一覧][スレッド一覧]

ruby-changes:69786

From: Peter <ko1@a...>
Date: Thu, 18 Nov 2021 03:20:45 +0900 (JST)
Subject: [ruby-changes:69786] 1454906d4e (master): Add tests for cme NULL crash

https://git.ruby-lang.org/ruby.git/commit/?id=1454906d4e

From 1454906d4e730312b175197182cf85581821ed5e Mon Sep 17 00:00:00 2001
From: Peter Zhu <peter@p...>
Date: Wed, 17 Nov 2021 09:07:47 -0500
Subject: Add tests for cme NULL crash

Tests for GitHub PR #5122. Originally in GitHub PR #5121.
---
 test/ruby/test_super.rb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index 3afde9b0e3a..6a575b88c51 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -549,7 +549,13 @@ class TestSuper < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_super.rb#L549
 
     o = b.new
     o.danger!
-    2.times { o.missing rescue NoMethodError }
+    begin
+      original_gc_stress = GC.stress
+      GC.stress = true
+      2.times { o.missing rescue NoMethodError }
+    ensure
+      GC.stress = original_gc_stress
+    end
   end
 
   def test_from_eval
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]