Mercurial > hg > truffle
comparison src/cpu/x86/vm/relocInfo_x86.cpp @ 8781:589aa23334ea
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 | cd3d6a6b95d9 |
children | 7875ea94bea5 |
comparison
equal
deleted
inserted
replaced
8780:98f3af397705 | 8781:589aa23334ea |
---|---|
143 WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm/imm32 | 143 WhichOperand which = (WhichOperand) format(); // that is, disp32 or imm/imm32 |
144 #ifdef AMD64 | 144 #ifdef AMD64 |
145 assert(which == Assembler::disp32_operand || | 145 assert(which == Assembler::disp32_operand || |
146 which == Assembler::call32_operand || | 146 which == Assembler::call32_operand || |
147 which == Assembler::imm_operand, "format unpacks ok"); | 147 which == Assembler::imm_operand, "format unpacks ok"); |
148 if (which != Assembler::imm_operand) { | 148 // The "address" in the code is a displacement can't return it as |
149 // The "address" in the code is a displacement can't return it as | 149 // and address* since it is really a jint* |
150 // and address* since it is really a jint* | 150 guarantee(which == Assembler::imm_operand, "must be immediate operand"); |
151 ShouldNotReachHere(); | |
152 return NULL; | |
153 } | |
154 #else | 151 #else |
155 assert(which == Assembler::disp32_operand || which == Assembler::imm_operand, "format unpacks ok"); | 152 assert(which == Assembler::disp32_operand || which == Assembler::imm_operand, "format unpacks ok"); |
156 #endif // AMD64 | 153 #endif // AMD64 |
157 return (address*) Assembler::locate_operand(addr(), which); | 154 return (address*) Assembler::locate_operand(addr(), which); |
158 } | 155 } |