8144852: Corrupted oop in nmethod
authordlong
Thu, 17 Dec 2015 09:39:07 -0800
changeset 35132 07bc696c7fdb
parent 35131 d231aa9f57ba
child 35134 dbf1c77ae372
8144852: Corrupted oop in nmethod Reviewed-by: vlivanov
hotspot/src/share/vm/code/nmethod.cpp
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Dec 09 13:37:59 2015 +0100
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Dec 17 09:39:07 2015 -0800
@@ -3042,7 +3042,11 @@
   for (int i = 0; i < oops_count(); i++) {
     oop o = oop_at(i);
     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(o));
-    o->print_value();
+    if (o == (oop)Universe::non_oop_word()) {
+      tty->print("non-oop word");
+    } else {
+      o->print_value();
+    }
     tty->cr();
   }
 }
@@ -3052,7 +3056,11 @@
   for (int i = 0; i < metadata_count(); i++) {
     Metadata* m = metadata_at(i);
     tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(m));
-    m->print_value_on_maybe_null(tty);
+    if (m == (Metadata*)Universe::non_oop_word()) {
+      tty->print("non-metadata word");
+    } else {
+      m->print_value_on_maybe_null(tty);
+    }
     tty->cr();
   }
 }