From d6fe3a53bdeea6b060d1755199cc2c27492dc14c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 10 Apr 2023 11:36:37 +0100 Subject: gentoo auto-resync : 10:04:2023 - 11:36:36 --- .../files/2.7/902-hppa-pthread-stack-size.patch | 54 ++++++++++++++++++++++ .../files/3.0/902-hppa-pthread-stack-size.patch | 54 ++++++++++++++++++++++ .../files/3.1/902-hppa-pthread-stack-size.patch | 54 ++++++++++++++++++++++ .../files/3.2/902-hppa-pthread-stack-size.patch | 54 ++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 dev-lang/ruby/files/2.7/902-hppa-pthread-stack-size.patch create mode 100644 dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch create mode 100644 dev-lang/ruby/files/3.1/902-hppa-pthread-stack-size.patch create mode 100644 dev-lang/ruby/files/3.2/902-hppa-pthread-stack-size.patch (limited to 'dev-lang/ruby/files') diff --git a/dev-lang/ruby/files/2.7/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/2.7/902-hppa-pthread-stack-size.patch new file mode 100644 index 000000000000..ae834d6e657f --- /dev/null +++ b/dev-lang/ruby/files/2.7/902-hppa-pthread-stack-size.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/701494 + +From cfac4ee59d09d72820bf220713615cf11211dad2 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 7 Apr 2023 11:46:12 +0100 +Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on + HPPA) + +On HPPA, test_insns.rb fails (along with various Ruby gems) with +'stack level too deep (SystemStackError)'. This turns out to be because HPPA +defaults to a small(er) stack. + +With this change, most of Ruby's test suite now passes on HPPA. + +Thanks to both Dave and Helge for the investigation and coming up with the +patch. + +Bug: https://bugs.gentoo.org/701494 +Bug: https://bugs.debian.org/881773 +Bug: https://bugs.debian.org/881772 (for PPC64) +Bug: https://github.com/rack/rack/issues/1640 +Thanks-to: John David Anglin +Thanks-to: Helge Deller +Signed-off-by: Sam James +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -656,8 +656,22 @@ size_t pthread_get_stacksize_np(pthread_t); + # define MAINSTACKADDR_AVAILABLE 0 + # endif + #endif +-#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +-# define get_main_stack(addr, size) get_stack(addr, size) ++#if MAINSTACKADDR_AVAILABLE ++static int get_stack(void **, size_t *); ++static int ++get_main_stack(void **addr, size_t *size) ++{ ++ int ret = get_stack(addr, size); ++ ++#ifdef __hppa__ ++ /* On some architectures, the initial stack size may be too small, but fortunately, ++ it's growable. Bump it up to the minimum needed if it is too small. */ ++ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) ++ *size = RUBY_VM_THREAD_VM_STACK_SIZE; ++#endif ++ ++ return ret; ++} + #endif + + #ifdef STACKADDR_AVAILABLE +-- +2.40.0 + diff --git a/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch new file mode 100644 index 000000000000..7978566afc7e --- /dev/null +++ b/dev-lang/ruby/files/3.0/902-hppa-pthread-stack-size.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/701494 + +From 794b6fce94343c4f9dceca5d08224b0fb364fde8 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 7 Apr 2023 11:46:12 +0100 +Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on + HPPA) + +On HPPA, test_insns.rb fails (along with various Ruby gems) with +'stack level too deep (SystemStackError)'. This turns out to be because HPPA +defaults to a small(er) stack. + +With this change, most of Ruby's test suite now passes on HPPA. + +Thanks to both Dave and Helge for the investigation and coming up with the +patch. + +Bug: https://bugs.gentoo.org/701494 +Bug: https://bugs.debian.org/881773 +Bug: https://bugs.debian.org/881772 (for PPC64) +Bug: https://github.com/rack/rack/issues/1640 +Thanks-to: John David Anglin +Thanks-to: Helge Deller +Signed-off-by: Sam James +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -681,8 +681,22 @@ size_t pthread_get_stacksize_np(pthread_t); + # define MAINSTACKADDR_AVAILABLE 0 + # endif + #endif +-#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +-# define get_main_stack(addr, size) get_stack(addr, size) ++#if MAINSTACKADDR_AVAILABLE ++static int get_stack(void **, size_t *); ++static int ++get_main_stack(void **addr, size_t *size) ++{ ++ int ret = get_stack(addr, size); ++ ++#ifdef __hppa__ ++ /* On some architectures, the initial stack size may be too small, but fortunately, ++ it's growable. Bump it up to the minimum needed if it is too small. */ ++ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) ++ *size = RUBY_VM_THREAD_VM_STACK_SIZE; ++#endif ++ ++ return ret; ++} + #endif + + #ifdef STACKADDR_AVAILABLE +-- +2.40.0 + diff --git a/dev-lang/ruby/files/3.1/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/3.1/902-hppa-pthread-stack-size.patch new file mode 100644 index 000000000000..2578ff03c3a6 --- /dev/null +++ b/dev-lang/ruby/files/3.1/902-hppa-pthread-stack-size.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/701494 + +From 91bfb8a5166f4530ce556a11a4b7fb64983b7686 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 7 Apr 2023 11:46:12 +0100 +Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on + HPPA) + +On HPPA, test_insns.rb fails (along with various Ruby gems) with +'stack level too deep (SystemStackError)'. This turns out to be because HPPA +defaults to a small(er) stack. + +With this change, most of Ruby's test suite now passes on HPPA. + +Thanks to both Dave and Helge for the investigation and coming up with the +patch. + +Bug: https://bugs.gentoo.org/701494 +Bug: https://bugs.debian.org/881773 +Bug: https://bugs.debian.org/881772 (for PPC64) +Bug: https://github.com/rack/rack/issues/1640 +Thanks-to: John David Anglin +Thanks-to: Helge Deller +Signed-off-by: Sam James +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -738,8 +738,22 @@ size_t pthread_get_stacksize_np(pthread_t); + # define MAINSTACKADDR_AVAILABLE 0 + # endif + #endif +-#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +-# define get_main_stack(addr, size) get_stack(addr, size) ++#if MAINSTACKADDR_AVAILABLE ++static int get_stack(void **, size_t *); ++static int ++get_main_stack(void **addr, size_t *size) ++{ ++ int ret = get_stack(addr, size); ++ ++#ifdef __hppa__ ++ /* On some architectures, the initial stack size may be too small, but fortunately, ++ it's growable. Bump it up to the minimum needed if it is too small. */ ++ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) ++ *size = RUBY_VM_THREAD_VM_STACK_SIZE; ++#endif ++ ++ return ret; ++} + #endif + + #ifdef STACKADDR_AVAILABLE +-- +2.40.0 + diff --git a/dev-lang/ruby/files/3.2/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/3.2/902-hppa-pthread-stack-size.patch new file mode 100644 index 000000000000..96e24a340ad9 --- /dev/null +++ b/dev-lang/ruby/files/3.2/902-hppa-pthread-stack-size.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/701494 + +From 40ccf3b91071d3603335b0b7095613ef1843f9e1 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 7 Apr 2023 11:46:12 +0100 +Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on + HPPA) + +On HPPA, test_insns.rb fails (along with various Ruby gems) with +'stack level too deep (SystemStackError)'. This turns out to be because HPPA +defaults to a small(er) stack. + +With this change, most of Ruby's test suite now passes on HPPA. + +Thanks to both Dave and Helge for the investigation and coming up with the +patch. + +Bug: https://bugs.gentoo.org/701494 +Bug: https://bugs.debian.org/881773 +Bug: https://bugs.debian.org/881772 (for PPC64) +Bug: https://github.com/rack/rack/issues/1640 +Thanks-to: John David Anglin +Thanks-to: Helge Deller +Signed-off-by: Sam James +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -858,8 +858,22 @@ size_t pthread_get_stacksize_np(pthread_t); + # define MAINSTACKADDR_AVAILABLE 0 + # endif + #endif +-#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +-# define get_main_stack(addr, size) get_stack(addr, size) ++#if MAINSTACKADDR_AVAILABLE ++static int get_stack(void **, size_t *); ++static int ++get_main_stack(void **addr, size_t *size) ++{ ++ int ret = get_stack(addr, size); ++ ++#ifdef __hppa__ ++ /* On some architectures, the initial stack size may be too small, but fortunately, ++ it's growable. Bump it up to the minimum needed if it is too small. */ ++ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) ++ *size = RUBY_VM_THREAD_VM_STACK_SIZE; ++#endif ++ ++ return ret; ++} + #endif + + #ifdef STACKADDR_AVAILABLE +-- +2.40.0 + -- cgit v1.2.3