about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch')
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
new file mode 100644
index 000000000000..7bf8b2b16744
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
@@ -0,0 +1,24 @@
+Taken from https://build.opensuse.org/package/view_file/Java:Factory/java-15-openjdk/openjdk-glibc234.patch
+
+--- openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c	2021-04-09 11:36:58.000000000 +0200
++++ openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c	2021-08-26 15:42:52.326232581 +0200
+@@ -67,8 +67,17 @@
+   longjmp(context, 1);
+ }
+ 
++static char* altstack = NULL;
++
+ void set_signal_handler() {
+-  static char altstack[SIGSTKSZ];
++  if (altstack == NULL) {
++    // Dynamically allocated in case SIGSTKSZ is not constant
++    altstack = malloc(SIGSTKSZ);
++    if (altstack == NULL) {
++      fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n");
++      exit(7);
++    }
++  }
+ 
+   stack_t ss = {
+     .ss_size = SIGSTKSZ,
+