diff options
author | glewis <glewis@FreeBSD.org> | 2019-08-12 12:05:58 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2019-08-12 12:05:58 +0800 |
commit | bf4c61cab826477255c2c6105c8ec52e50fcec04 (patch) | |
tree | 4874d362eca948068a150267a5237ca9c7925bdb /java | |
parent | e99d97f74e166fad6ef8c7a953896da68194fac4 (diff) | |
download | freebsd-ports-gnome-bf4c61cab826477255c2c6105c8ec52e50fcec04.tar.gz freebsd-ports-gnome-bf4c61cab826477255c2c6105c8ec52e50fcec04.tar.zst freebsd-ports-gnome-bf4c61cab826477255c2c6105c8ec52e50fcec04.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
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk8/Makefile | 1 | ||||
-rw-r--r-- | java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp | 12 |
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() && |