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

ruby-changes:69337

From: Alan <ko1@a...>
Date: Fri, 22 Oct 2021 23:54:01 +0900 (JST)
Subject: [ruby-changes:69337] ba4bf8a1e6 (master): Fix simple test on platforms where compaction is not supported

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

From ba4bf8a1e6554c47b5559a6568ebb8aea5a21d9e Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Fri, 22 Oct 2021 10:53:42 -0400
Subject: Fix simple test on platforms where compaction is not supported

844588f9157b364244a7d34ee0fcc70ccc2a7dd9 made it so that trying to call
gc_verify_compaction_references on unsupported platform result in an
exception rather than a crash. Rescue the exception in a YJIT btest
that uses gc_verify_compaction_references.
---
 bootstraptest/test_yjit.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 53cdcc69ac..20db784a39 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -662,7 +662,11 @@ assert_equal "good", %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_yjit.rb#L662
   foo
   foo
 
-  GC.verify_compaction_references(double_heap: true, toward: :empty)
+  begin
+    GC.verify_compaction_references(double_heap: true, toward: :empty)
+  rescue NotImplementedError
+    # in case compaction isn't supported
+  end
 
   foo
 }
-- 
cgit v1.2.1


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

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