changeset 16382:6d063103018a

8009584: [parfait] Null pointer deference in hotspot/src/cpu/x86/vm/relocInfo_x86.cpp Summary: added guarantee() to pd_address_in_code() Reviewed-by: kvn
author morris
date Thu, 21 Mar 2013 10:11:24 -0700
parents 806d87cb0cc7
children 57cb9d398a11
files hotspot/src/cpu/x86/vm/relocInfo_x86.cpp
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp	Wed Mar 20 17:04:45 2013 -0700
+++ b/hotspot/src/cpu/x86/vm/relocInfo_x86.cpp	Thu Mar 21 10:11:24 2013 -0700
@@ -145,12 +145,9 @@
   assert(which == Assembler::disp32_operand ||
          which == Assembler::call32_operand ||
          which == Assembler::imm_operand, "format unpacks ok");
-  if (which != Assembler::imm_operand) {
-    // The "address" in the code is a displacement can't return it as
-    // and address* since it is really a jint*
-    ShouldNotReachHere();
-    return NULL;
-  }
+  // The "address" in the code is a displacement can't return it as
+  // and address* since it is really a jint*
+  guarantee(which == Assembler::imm_operand, "must be immediate operand");
 #else
   assert(which == Assembler::disp32_operand || which == Assembler::imm_operand, "format unpacks ok");
 #endif // AMD64