mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8008328: [partfait] Null pointer defererence in hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
Add guarantee() to oop_result inlines Reviewed-by: kvn, twisti
This commit is contained in:
parent
5b72922058
commit
e98f593fb0
1 changed files with 8 additions and 4 deletions
|
@ -295,14 +295,18 @@ inline bool frame::volatile_across_calls(Register reg) {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline oop frame::saved_oop_result(RegisterMap* map) const {
|
||||
return *((oop*) map->location(rax->as_VMReg()));
|
||||
oop* result_adr = (oop *)map->location(rax->as_VMReg());
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
|
||||
return (*result_adr);
|
||||
}
|
||||
|
||||
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
|
||||
*((oop*) map->location(rax->as_VMReg())) = obj;
|
||||
oop* result_adr = (oop *)map->location(rax->as_VMReg());
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
|
||||
*result_adr = obj;
|
||||
}
|
||||
|
||||
#endif // CPU_X86_VM_FRAME_X86_INLINE_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue