src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp
changeset 57594 61c2e3e7315d
parent 55653 3243c42d737d
child 58679 9c3209ff7550
--- a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Tue Jul 30 09:56:18 2019 -0400
+++ b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp	Tue Jul 30 17:54:53 2019 +0200
@@ -502,6 +502,15 @@
         return true;
       }
     }
+
+    // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
+    // and the heap gets shrunk before the field access.
+    if ((sig == SIGSEGV) || (sig == SIGBUS)) {
+      address addr = JNI_FastGetField::find_slowcase_pc(pc);
+      if (addr != (address)-1) {
+        stub = addr;
+      }
+    }
   }
 
   if (stub != NULL) {