diff options
-rw-r--r-- | gnu/local.mk | 2 | ||||
-rw-r--r-- | gnu/packages/java.scm | 4 | ||||
-rw-r--r-- | gnu/packages/patches/openjdk-10-pointer-comparison.patch | 14 | ||||
-rw-r--r-- | gnu/packages/patches/openjdk-10-setsignalhandler.patch | 25 |
4 files changed, 44 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index b184f6c5a3..d583e06e18 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1619,6 +1619,8 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-9-pointer-comparison.patch \ %D%/packages/patches/openjdk-9-setsignalhandler.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ + %D%/packages/patches/openjdk-10-pointer-comparison.patch \ + %D%/packages/patches/openjdk-10-setsignalhandler.patch \ %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e8cc968544..a01309e730 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1058,7 +1058,9 @@ new Date();")) (base32 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y")) (patches (search-patches - "openjdk-10-idlj-reproducibility.patch")))) + "openjdk-10-idlj-reproducibility.patch" + "openjdk-10-pointer-comparison.patch" + "openjdk-10-setsignalhandler.patch")))) (arguments (substitute-keyword-arguments (package-arguments openjdk9) ((#:phases phases) diff --git a/gnu/packages/patches/openjdk-10-pointer-comparison.patch b/gnu/packages/patches/openjdk-10-pointer-comparison.patch new file mode 100644 index 0000000000..9c09f8e391 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-pointer-comparison.patch @@ -0,0 +1,14 @@ +Patch inspired by file comparison with openjdk@19. + +diff -u -r openjdk-10.alt/src/hotspot/os/linux/os_linux.cpp openjdk-10/src/hotspot/os/linux/os_linux.cpp +--- openjdk-10.alt/src/hotspot/os/linux/os_linux.cpp 2023-04-05 15:02:56.994779480 +0200 ++++ openjdk-10/src/hotspot/os/linux/os_linux.cpp 2023-04-05 15:07:47.267537301 +0200 +@@ -2155,7 +2155,7 @@ + } + + p = OSContainer::cpu_cpuset_memory_nodes(); +- if (p < 0) ++ if (p == NULL) + st->print("cpu_memory_nodes() failed\n"); + else { + st->print("cpu_memory_nodes: %s\n", p); diff --git a/gnu/packages/patches/openjdk-10-setsignalhandler.patch b/gnu/packages/patches/openjdk-10-setsignalhandler.patch new file mode 100644 index 0000000000..c91ae6b318 --- /dev/null +++ b/gnu/packages/patches/openjdk-10-setsignalhandler.patch @@ -0,0 +1,25 @@ +Patch inspired by file comparison with openjdk@19. + +diff -u -r openjdk-10.alt/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c openjdk-10/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c +--- openjdk-10.alt/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2023-04-05 15:03:00.070787628 +0200 ++++ openjdk-10/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2023-04-05 15:29:51.379824348 +0200 +@@ -67,8 +67,17 @@ + longjmp(context, 1); + } + +-void set_signal_handler() { +- static char altstack[SIGSTKSZ]; ++static char* altstack = NULL; ++ ++ void set_signal_handler() { ++ if (altstack == NULL) { ++ // Dynamically allocated in case SIGSTKSZ is not constant ++ altstack = (char*)malloc(SIGSTKSZ); ++ if (altstack == NULL) { ++ fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n"); ++ exit(7); ++ } ++ } + + stack_t ss = { + .ss_size = SIGSTKSZ, |