Blame SOURCES/rh1201393.patch

c2cb23
# HG changeset patch
c2cb23
# User goetz
c2cb23
# Date 1430299335 -7200
c2cb23
#      Wed Apr 29 11:22:15 2015 +0200
c2cb23
# Node ID c4bfba1711bad17f743648f775870864dbe1c2e3
c2cb23
# Parent  1da8d6e3bcfeecabc3c13d37f44eced2d7fef521
c2cb23
8078482, PR2398, RH1201393: ppc: pass thread to throw_AbstractMethodError
c2cb23
Summary: Also improve check for Safepoints in signal handler.
c2cb23
Reviewed-by: kvn, simonis
c2cb23
c2cb23
diff -r 1da8d6e3bcfe -r c4bfba1711ba src/cpu/ppc/vm/interpreter_ppc.cpp
c2cb23
--- openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Wed Apr 29 12:23:48 2015 -0700
c2cb23
+++ openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Wed Apr 29 11:22:15 2015 +0200
c2cb23
@@ -1,6 +1,6 @@
c2cb23
 /*
c2cb23
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
c2cb23
- * Copyright 2012, 2014 SAP AG. All rights reserved.
c2cb23
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
c2cb23
+ * Copyright 2012, 2015 SAP AG. All rights reserved.
c2cb23
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c2cb23
  *
c2cb23
  * This code is free software; you can redistribute it and/or modify it
c2cb23
@@ -459,7 +459,8 @@
c2cb23
 
c2cb23
   // This is not a leaf but we have a JavaFrameAnchor now and we will
c2cb23
   // check (create) exceptions afterward so this is ok.
c2cb23
-  __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
c2cb23
+  __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError),
c2cb23
+                  R16_thread);
c2cb23
 
c2cb23
   // Pop the C frame and restore LR.
c2cb23
   __ pop_frame();
c2cb23
diff -r 1da8d6e3bcfe -r c4bfba1711ba src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
c2cb23
--- openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Wed Apr 29 12:23:48 2015 -0700
c2cb23
+++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Wed Apr 29 11:22:15 2015 +0200
c2cb23
@@ -1,6 +1,6 @@
c2cb23
 /*
c2cb23
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
c2cb23
- * Copyright 2012, 2014 SAP AG. All rights reserved.
c2cb23
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
c2cb23
+ * Copyright 2012, 2015 SAP AG. All rights reserved.
c2cb23
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c2cb23
  *
c2cb23
  * This code is free software; you can redistribute it and/or modify it
c2cb23
@@ -290,6 +290,7 @@
c2cb23
         goto report_and_die;
c2cb23
       }
c2cb23
 
c2cb23
+      CodeBlob *cb = NULL;
c2cb23
       // Handle signal from NativeJump::patch_verified_entry().
c2cb23
       if (( TrapBasedNotEntrantChecks && sig == SIGTRAP && nativeInstruction_at(pc)->is_sigtrap_zombie_not_entrant()) ||
c2cb23
           (!TrapBasedNotEntrantChecks && sig == SIGILL  && nativeInstruction_at(pc)->is_sigill_zombie_not_entrant())) {
c2cb23
@@ -305,7 +306,10 @@
c2cb23
                // especially when we try to read from the safepoint polling page. So the check
c2cb23
                //   (address)info->si_addr == os::get_standard_polling_page()
c2cb23
                // doesn't work for us. We use:
c2cb23
-               ((NativeInstruction*)pc)->is_safepoint_poll()) {
c2cb23
+               ((NativeInstruction*)pc)->is_safepoint_poll() &&
c2cb23
+               CodeCache::contains((void*) pc) &&
c2cb23
+               ((cb = CodeCache::find_blob(pc)) != NULL) &&
c2cb23
+               cb->is_nmethod()) {
c2cb23
         if (TraceTraps) {
c2cb23
           tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
c2cb23
         }