1 |
# HG changeset patch |
2 |
# User goetz |
3 |
# Date 1430299335 -7200 |
4 |
# Wed Apr 29 11:22:15 2015 +0200 |
5 |
# Node ID c4bfba1711bad17f743648f775870864dbe1c2e3 |
6 |
# Parent 1da8d6e3bcfeecabc3c13d37f44eced2d7fef521 |
7 |
8078482, PR2398, RH1201393: ppc: pass thread to throw_AbstractMethodError |
8 |
Summary: Also improve check for Safepoints in signal handler. |
9 |
Reviewed-by: kvn, simonis |
10 |
|
11 |
diff -r 1da8d6e3bcfe -r c4bfba1711ba src/cpu/ppc/vm/interpreter_ppc.cpp |
12 |
--- openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Wed Apr 29 12:23:48 2015 -0700 |
13 |
+++ openjdk/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp Wed Apr 29 11:22:15 2015 +0200 |
14 |
@@ -1,6 +1,6 @@ |
15 |
/* |
16 |
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
17 |
- * Copyright 2012, 2014 SAP AG. All rights reserved. |
18 |
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
19 |
+ * Copyright 2012, 2015 SAP AG. All rights reserved. |
20 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
21 |
* |
22 |
* This code is free software; you can redistribute it and/or modify it |
23 |
@@ -459,7 +459,8 @@ |
24 |
|
25 |
// This is not a leaf but we have a JavaFrameAnchor now and we will |
26 |
// check (create) exceptions afterward so this is ok. |
27 |
- __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError)); |
28 |
+ __ call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError), |
29 |
+ R16_thread); |
30 |
|
31 |
// Pop the C frame and restore LR. |
32 |
__ pop_frame(); |
33 |
diff -r 1da8d6e3bcfe -r c4bfba1711ba src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp |
34 |
--- openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Wed Apr 29 12:23:48 2015 -0700 |
35 |
+++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Wed Apr 29 11:22:15 2015 +0200 |
36 |
@@ -1,6 +1,6 @@ |
37 |
/* |
38 |
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
39 |
- * Copyright 2012, 2014 SAP AG. All rights reserved. |
40 |
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
41 |
+ * Copyright 2012, 2015 SAP AG. All rights reserved. |
42 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
43 |
* |
44 |
* This code is free software; you can redistribute it and/or modify it |
45 |
@@ -290,6 +290,7 @@ |
46 |
goto report_and_die; |
47 |
} |
48 |
|
49 |
+ CodeBlob *cb = NULL; |
50 |
// Handle signal from NativeJump::patch_verified_entry(). |
51 |
if (( TrapBasedNotEntrantChecks && sig == SIGTRAP && nativeInstruction_at(pc)->is_sigtrap_zombie_not_entrant()) || |
52 |
(!TrapBasedNotEntrantChecks && sig == SIGILL && nativeInstruction_at(pc)->is_sigill_zombie_not_entrant())) { |
53 |
@@ -305,7 +306,10 @@ |
54 |
// especially when we try to read from the safepoint polling page. So the check |
55 |
// (address)info->si_addr == os::get_standard_polling_page() |
56 |
// doesn't work for us. We use: |
57 |
- ((NativeInstruction*)pc)->is_safepoint_poll()) { |
58 |
+ ((NativeInstruction*)pc)->is_safepoint_poll() && |
59 |
+ CodeCache::contains((void*) pc) && |
60 |
+ ((cb = CodeCache::find_blob(pc)) != NULL) && |
61 |
+ cb->is_nmethod()) { |
62 |
if (TraceTraps) { |
63 |
tty->print_cr("trap: safepoint_poll at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc)); |
64 |
} |