nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

openjdk11: fix build w/glibc-2.34

Failing Hydra build: https://hydra.nixos.org/build/154132196

+26
+1
pkgs/development/compilers/openjdk/11.nix
··· 40 40 ./currency-date-range-jdk10.patch 41 41 ./increase-javadoc-heap.patch 42 42 ./fix-library-path-jdk11.patch 43 + ./fix-glibc-2.34.patch 43 44 ] ++ lib.optionals (!headless && enableGnome2) [ 44 45 ./swing-use-gtk-jdk10.patch 45 46 ];
+1
pkgs/development/compilers/openjdk/16.nix
··· 48 48 url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch"; 49 49 sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r"; 50 50 }) 51 + ./fix-glibc-2.34.patch 51 52 ] ++ lib.optionals (!headless && enableGnome2) [ 52 53 ./swing-use-gtk-jdk13.patch 53 54 ];
+24
pkgs/development/compilers/openjdk/fix-glibc-2.34.patch
··· 1 + Taken from https://build.opensuse.org/package/view_file/Java:Factory/java-15-openjdk/openjdk-glibc234.patch 2 + 3 + --- openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2021-04-09 11:36:58.000000000 +0200 4 + +++ openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2021-08-26 15:42:52.326232581 +0200 5 + @@ -67,8 +67,17 @@ 6 + longjmp(context, 1); 7 + } 8 + 9 + +static char* altstack = NULL; 10 + + 11 + void set_signal_handler() { 12 + - static char altstack[SIGSTKSZ]; 13 + + if (altstack == NULL) { 14 + + // Dynamically allocated in case SIGSTKSZ is not constant 15 + + altstack = malloc(SIGSTKSZ); 16 + + if (altstack == NULL) { 17 + + fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n"); 18 + + exit(7); 19 + + } 20 + + } 21 + 22 + stack_t ss = { 23 + .ss_size = SIGSTKSZ, 24 +