src/hotspot/share/runtime/os.cpp
changeset 48808 2b0b7f222800
parent 48787 7638bf98a312
child 48859 5a4d08efbad9
--- a/src/hotspot/share/runtime/os.cpp	Fri Jan 19 17:01:34 2018 +0100
+++ b/src/hotspot/share/runtime/os.cpp	Tue Jan 23 14:27:10 2018 -0500
@@ -987,6 +987,11 @@
 // The verbose parameter is only set by the debug code in one case
 void os::print_location(outputStream* st, intptr_t x, bool verbose) {
   address addr = (address)x;
+  // Handle NULL first, so later checks don't need to protect against it.
+  if (addr == NULL) {
+    st->print_cr("0x0 is NULL");
+    return;
+  }
   CodeBlob* b = CodeCache::find_blob_unsafe(addr);
   if (b != NULL) {
     if (b->is_buffer_blob()) {