summaryrefslogtreecommitdiff
path: root/java/openjdk8/files
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/files
parentdevel/py-virtualenvwrapper: Allow Python 3 builds (diff)
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/openjdk8/files')
-rw-r--r--java/openjdk8/files/patch-hotspot_src_os__cpu_bsd__x86_vm_os__bsd__x86.cpp12
1 files changed, 12 insertions, 0 deletions
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() &&