unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob c91ae6b3186805593fd80814b095069a50a69d39 897 bytes (raw)
name: packages/patches/openjdk-10-setsignalhandler.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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,

debug log:

solving c91ae6b3186805593fd80814b095069a50a69d39 ...
found c91ae6b3186805593fd80814b095069a50a69d39 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).