aboutsummaryrefslogtreecommitdiff
path: root/java/openjdk8
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2019-08-12 04:05:58 +0000
committerGreg Lewis <glewis@FreeBSD.org>2019-08-12 04:05:58 +0000
commitc1db70582338532c303389af118cdc55008baec2 (patch)
tree4874d362eca948068a150267a5237ca9c7925bdb /java/openjdk8
parent2f2bf67c52633c8fe30297801d718fdacc071b42 (diff)
downloadports-c1db70582338532c303389af118cdc55008baec2.tar.gz
ports-c1db70582338532c303389af118cdc55008baec2.zip
Workaround for infinite recursion crash
* FreeBSD crashes on infinite recursion rather than throwing a stack overflow because the stack address of the fault is in the page below the guard area. Workaround this by rounding down the fault address to the nearest page boundary. Investigation is still under way into what may be causing this but this appears to prevent it in simple test cases. PR: 222146
Notes
Notes: svn path=/head/; revision=508703
Diffstat (limited to 'java/openjdk8')
-rw-r--r--java/openjdk8/Makefile1
-rw-r--r--java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp12
2 files changed, 13 insertions, 0 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index 6421cbffb776..1c1e27d8bf56 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -2,6 +2,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}.${BSD_JDK_VERSION}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= LOCAL/jkim:jtreg
PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION}
diff --git a/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp b/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp
new file mode 100644
index 000000000000..f90ed6a5ba19
--- /dev/null
+++ b/java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp
@@ -0,0 +1,12 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig 2019-08-11 09:24:22.211149000 -0700
++++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2019-08-11 09:25:08.826582000 -0700
+@@ -470,6 +470,9 @@
+ // Handle ALL stack overflow variations here
+ if (sig == SIGSEGV || sig == SIGBUS) {
+ address addr = (address) info->si_addr;
++#ifdef __FreeBSD__
++ addr = (unsigned char*) align_ptr_down(addr, os::vm_page_size());
++#endif
+
+ // check if fault address is within thread stack
+ if (addr < thread->stack_base() &&