diff --git a/ruby-3.0.0-Do-not-allocate-ractor-local-storage-in-dfree-function-during-GC.patch b/ruby-3.0.0-Do-not-allocate-ractor-local-storage-in-dfree-function-during-GC.patch new file mode 100644 index 0000000..c63c7c3 --- /dev/null +++ b/ruby-3.0.0-Do-not-allocate-ractor-local-storage-in-dfree-function-during-GC.patch @@ -0,0 +1,24 @@ +From 265c0022390e3dcd4ff692fc77d29b94e652c877 Mon Sep 17 00:00:00 2001 +From: Nobuyoshi Nakada +Date: Tue, 9 Feb 2021 01:00:00 +0900 +Subject: [PATCH] Do not allocate ractor-local storage in dfree function during + GC + +--- + random.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/random.c b/random.c +index c11cd803f2cb..83df6d1eb537 100644 +--- a/random.c ++++ b/random.c +@@ -257,7 +257,8 @@ const rb_data_type_t rb_random_data_type = { + static void + random_mt_free(void *ptr) + { +- if (ptr != default_rand()) ++ rb_random_mt_t *rnd = rb_ractor_local_storage_ptr(default_rand_key); ++ if (ptr != rnd) + xfree(ptr); + } + diff --git a/ruby.spec b/ruby.spec index 3ad310f..cc9f9a8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -22,7 +22,7 @@ %endif -%global release 145 +%global release 146 %{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory tree, since the @@ -159,6 +159,9 @@ Patch12: rubygems-3.2.7-Generate-plugin-wrappers-with-relative-requires.patch # Avoid ruby-spec to be stuck in "C-API Kernel function rb_rescue2". # https://bugs.ruby-lang.org/issues/17338 Patch13: ruby-3.0.0-va_list-args-in-rb_vrescue2-is-reused.patch +# Fix flaky excon test suite. +# https://bugs.ruby-lang.org/issues/17653 +Patch14: ruby-3.0.0-Do-not-allocate-ractor-local-storage-in-dfree-function-during-GC.patch # Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add. # https://bugs.ruby-lang.org/issues/16492 Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch @@ -611,6 +614,7 @@ rm -rf ext/fiddle/libffi* %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %patch19 -p1 # Provide an example of usage of the tapset: @@ -1375,6 +1379,9 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_bug_reporter_add/" %changelog +* Tue Mar 02 2021 Vít Ondruch - 3.0.0-146 +- Fix flaky excon test suite. + * Mon Jan 25 2021 Vít Ondruch - 3.0.0-145 - Bundle OpenSSL into StdLib. - Use proper path for plugin wrappers.