提交 4e37de86 编写于 作者: M morris

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
上级 2171cce1
...@@ -145,12 +145,9 @@ address* Relocation::pd_address_in_code() { ...@@ -145,12 +145,9 @@ address* Relocation::pd_address_in_code() {
assert(which == Assembler::disp32_operand || assert(which == Assembler::disp32_operand ||
which == Assembler::call32_operand || which == Assembler::call32_operand ||
which == Assembler::imm_operand, "format unpacks ok"); 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 // The "address" in the code is a displacement can't return it as
// and address* since it is really a jint* // and address* since it is really a jint*
ShouldNotReachHere(); guarantee(which == Assembler::imm_operand, "must be immediate operand");
return NULL;
}
#else #else
assert(which == Assembler::disp32_operand || which == Assembler::imm_operand, "format unpacks ok"); assert(which == Assembler::disp32_operand || which == Assembler::imm_operand, "format unpacks ok");
#endif // AMD64 #endif // AMD64
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册