Blame SOURCES/jdk8279077-missing_crash_protector_ppc.patch

2ea0ba
# HG changeset patch
2ea0ba
# User zgu
2ea0ba
# Date 1641313782 0
2ea0ba
#      Tue Jan 04 16:29:42 2022 +0000
2ea0ba
# Node ID b694a28adaa2a602fedbc4aeba69b9c2350e7409
2ea0ba
# Parent  3177fc2314df6deb4d4771148f27934a597dd1d7
2ea0ba
8279077: JFR crashes on Linux ppc due to missing crash protector in signal handler
2ea0ba
Reviewed-by: phh
2ea0ba
2ea0ba
diff --git openjdk.orig/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
2ea0ba
--- openjdk.orig/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
2ea0ba
+++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
2ea0ba
@@ -176,6 +176,10 @@
2ea0ba
 
2ea0ba
   Thread* t = ThreadLocalStorage::get_thread_slow();
2ea0ba
 
2ea0ba
+  // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
2ea0ba
+  // (no destructors can be run)
2ea0ba
+  os::ThreadCrashProtection::check_crash_protection(sig, t);
2ea0ba
+
2ea0ba
   SignalHandlerMark shm(t);
2ea0ba
 
2ea0ba
   // Note: it's not uncommon that JNI code uses signal/sigset to install