Mercurial > hg > icedtea7-forest-aarch64 > hotspot
changeset 6015:f7997fb19abe
8008328: [partfait] Null pointer defererence in hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
Summary: add guarantee() to oop_result inlines
Reviewed-by: morris, kvn, twisti
author | sgabdura |
---|---|
date | Thu, 02 Oct 2014 10:08:31 +0200 |
parents | c7f740ad8991 |
children | 34d960c55c6d |
files | src/cpu/x86/vm/frame_x86.inline.hpp |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/x86/vm/frame_x86.inline.hpp Thu Sep 18 11:46:33 2014 -0700 +++ b/src/cpu/x86/vm/frame_x86.inline.hpp Thu Oct 02 10:08:31 2014 +0200 @@ -292,14 +292,18 @@ return true; } - +inline oop frame::saved_oop_result(RegisterMap* map) const { + oop* result_adr = (oop *)map->location(rax->as_VMReg()); + guarantee(result_adr != NULL, "bad register save location"); -inline oop frame::saved_oop_result(RegisterMap* map) const { - return *((oop*) map->location(rax->as_VMReg())); + 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