aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk7/icedtea-jdk-disable-vfork.patch
diff options
context:
space:
mode:
authorSimon Frankenberger <simon@fraho.eu>2020-12-09 19:20:33 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2020-12-10 11:34:01 +0000
commit72743088d39389aa65ce5bbb88baa385b8d3da09 (patch)
tree6115a6235a13bb02e3b21f4052926a6281bf9532 /community/openjdk7/icedtea-jdk-disable-vfork.patch
parenta4abde86e6aa9632b0116941c89380e5df82a0de (diff)
downloadaports-72743088d39389aa65ce5bbb88baa385b8d3da09.tar.gz
aports-72743088d39389aa65ce5bbb88baa385b8d3da09.tar.bz2
aports-72743088d39389aa65ce5bbb88baa385b8d3da09.tar.xz
community/openjdk7: disable vfork and fix wrong icedtea version
The new patch replaces calls to vfork() with regular fork(). As discussed in irclogs from 2020/12. This should fix the deadlocks while building on aarch64. Also this commit fixes the wrong icedtea version number from previous upgrade.
Diffstat (limited to 'community/openjdk7/icedtea-jdk-disable-vfork.patch')
-rw-r--r--community/openjdk7/icedtea-jdk-disable-vfork.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/community/openjdk7/icedtea-jdk-disable-vfork.patch b/community/openjdk7/icedtea-jdk-disable-vfork.patch
new file mode 100644
index 0000000000..3cd3e5c448
--- /dev/null
+++ b/community/openjdk7/icedtea-jdk-disable-vfork.patch
@@ -0,0 +1,27 @@
+--- openjdk.orig/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
++++ openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
+@@ -552,7 +552,11 @@
+ startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
+ switch (c->mode) {
+ case MODE_VFORK:
++// use regular fork when running on musl
++// this should fix deadlocks on aarch64
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ return vforkChild(c);
++#endif
+ case MODE_FORK:
+ return forkChild(c);
+ #if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
+@@ -651,8 +655,12 @@
+ if (resultPid < 0) {
+ switch (c->mode) {
+ case MODE_VFORK:
++// use regular fork when running on musl
++// this should fix deadlocks on aarch64
++#if defined(__GLIBC__) || defined(__UCLIBC__)
+ throwIOException(env, errno, "vfork failed");
+ break;
++#endif
+ case MODE_FORK:
+ throwIOException(env, errno, "fork failed");
+ break;