Apply patch fixing flaky excon test suite.

This commit is contained in:
Vít Ondruch 2021-03-02 10:16:45 +01:00
parent 3210f66fb1
commit 2bc8b3d5d5
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 265c0022390e3dcd4ff692fc77d29b94e652c877 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
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);
}

View File

@ -22,7 +22,7 @@
%endif %endif
%global release 145 %global release 146
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %{!?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 # 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". # Avoid ruby-spec to be stuck in "C-API Kernel function rb_rescue2".
# https://bugs.ruby-lang.org/issues/17338 # https://bugs.ruby-lang.org/issues/17338
Patch13: ruby-3.0.0-va_list-args-in-rb_vrescue2-is-reused.patch 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. # Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.
# https://bugs.ruby-lang.org/issues/16492 # https://bugs.ruby-lang.org/issues/16492
Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch 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 %patch11 -p1
%patch12 -p1 %patch12 -p1
%patch13 -p1 %patch13 -p1
%patch14 -p1
%patch19 -p1 %patch19 -p1
# Provide an example of usage of the tapset: # Provide an example of usage of the tapset:
@ -1375,6 +1379,9 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_bug_reporter_add/"
%changelog %changelog
* Tue Mar 02 2021 Vít Ondruch <vondruch@redhat.com> - 3.0.0-146
- Fix flaky excon test suite.
* Mon Jan 25 2021 Vít Ondruch <vondruch@redhat.com> - 3.0.0-145 * Mon Jan 25 2021 Vít Ondruch <vondruch@redhat.com> - 3.0.0-145
- Bundle OpenSSL into StdLib. - Bundle OpenSSL into StdLib.
- Use proper path for plugin wrappers. - Use proper path for plugin wrappers.