From 4e37de865784db9f453354f704bf4489c2bcc246 Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 21 Mar 2013 10:11:24 -0700 Subject: [PATCH] 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 --- src/cpu/x86/vm/relocInfo_x86.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cpu/x86/vm/relocInfo_x86.cpp b/src/cpu/x86/vm/relocInfo_x86.cpp index d4a929613..e16c66539 100644 --- a/src/cpu/x86/vm/relocInfo_x86.cpp +++ b/src/cpu/x86/vm/relocInfo_x86.cpp @@ -145,12 +145,9 @@ address* Relocation::pd_address_in_code() { 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 -- GitLab