changeset 13463:b7de86ca4cc5

Merge
author alanb
date Thu, 01 Jun 2017 19:43:56 +0100
parents 5ada634b8e54 d5ed1e34de8b
children ced5969cff68
files .hgtags src/share/vm/runtime/sharedRuntime.cpp
diffstat 4 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu May 25 22:15:43 2017 -0700
+++ b/.hgtags	Thu Jun 01 19:43:56 2017 +0100
@@ -577,3 +577,4 @@
 16d692be099c5c38eb48cc9aca78b0c900910d5b jdk-9+169
 38a240fd58a287acb1963920b92ed4d9c2fd39e3 jdk-9+170
 d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
+1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
--- a/src/share/vm/code/relocInfo.cpp	Thu May 25 22:15:43 2017 -0700
+++ b/src/share/vm/code/relocInfo.cpp	Thu Jun 01 19:43:56 2017 +0100
@@ -129,9 +129,9 @@
   if (nm == NULL && begin != NULL) {
     // allow nmethod to be deduced from beginning address
     CodeBlob* cb = CodeCache::find_blob(begin);
-    nm = cb->as_compiled_method_or_null();
+    nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
   }
-  assert(nm != NULL, "must be able to deduce nmethod from other arguments");
+  guarantee(nm != NULL, "must be able to deduce nmethod from other arguments");
 
   _code    = nm;
   _current = nm->relocation_begin() - 1;
--- a/src/share/vm/compiler/oopMap.cpp	Thu May 25 22:15:43 2017 -0700
+++ b/src/share/vm/compiler/oopMap.cpp	Thu Jun 01 19:43:56 2017 +0100
@@ -350,16 +350,14 @@
         omv = oms.current();
         oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
         guarantee(loc != NULL, "missing saved register");
+        oop *derived_loc = loc;
         oop *base_loc    = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
-        oop *derived_loc = loc;
-        oop val = *base_loc;
-        if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
-          // Ignore NULL oops and decoded NULL narrow oops which
-          // equal to Universe::narrow_oop_base when a narrow oop
-          // implicit null check is used in compiled code.
-          // The narrow_oop_base could be NULL or be the address
-          // of the page below heap depending on compressed oops mode.
-        } else {
+        // Ignore NULL oops and decoded NULL narrow oops which
+        // equal to Universe::narrow_oop_base when a narrow oop
+        // implicit null check is used in compiled code.
+        // The narrow_oop_base could be NULL or be the address
+        // of the page below heap depending on compressed oops mode.
+        if (base_loc != NULL && *base_loc != (oop)NULL && !Universe::is_narrow_oop_base(*base_loc)) {
           derived_oop_fn(base_loc, derived_loc);
         }
         oms.next();
--- a/src/share/vm/runtime/sharedRuntime.cpp	Thu May 25 22:15:43 2017 -0700
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Thu Jun 01 19:43:56 2017 +0100
@@ -549,7 +549,7 @@
   CodeBlob *cb = CodeCache::find_blob(pc);
 
   // Should be an nmethod
-  assert(cb && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod");
+  guarantee(cb != NULL && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod");
 
   // Look up the relocation information
   assert(((CompiledMethod*)cb)->is_at_poll_or_poll_return(pc),
@@ -1802,7 +1802,7 @@
   if (destination != entry_point) {
     CodeBlob* callee = CodeCache::find_blob(destination);
     // callee == cb seems weird. It means calling interpreter thru stub.
-    if (callee == cb || callee->is_adapter_blob()) {
+    if (callee != NULL && (callee == cb || callee->is_adapter_blob())) {
       // static call or optimized virtual
       if (TraceCallFixup) {
         tty->print("fixup callsite           at " INTPTR_FORMAT " to compiled code for", p2i(caller_pc));
@@ -1851,7 +1851,7 @@
   // ask me how I know this...
 
   CodeBlob* cb = CodeCache::find_blob(caller_pc);
-  if (!cb->is_compiled() || entry_point == moop->get_c2i_entry()) {
+  if (cb == NULL || !cb->is_compiled() || entry_point == moop->get_c2i_entry()) {
     return;
   }