Mercurial > hg > truffle
diff src/share/vm/runtime/frame.cpp @ 8690:c40fbf634c90
8008574: [parfait] Null pointer deference in hotspot/src/share/vm/runtime/frame.cpp
Summary: fix null pointer
Reviewed-by: kvn
author | morris |
---|---|
date | Tue, 05 Mar 2013 04:24:33 -0800 |
parents | d2f8c38e543d |
children | b9a918201d47 28e5aed7f3a6 0f03ff49c720 |
line wrap: on
line diff
--- a/src/share/vm/runtime/frame.cpp Mon Mar 04 13:15:01 2013 -0800 +++ b/src/share/vm/runtime/frame.cpp Tue Mar 05 04:24:33 2013 -0800 @@ -1070,7 +1070,12 @@ // First consult the ADLC on where it puts parameter 0 for this signature. VMReg reg = SharedRuntime::name_for_receiver(); - oop r = *caller.oopmapreg_to_location(reg, reg_map); + oop* oop_adr = caller.oopmapreg_to_location(reg, reg_map); + if (oop_adr == NULL) { + guarantee(oop_adr != NULL, "bad register save location"); + return NULL; + } + oop r = *oop_adr; assert(Universe::heap()->is_in_or_null(r), err_msg("bad receiver: " INTPTR_FORMAT " (" INTX_FORMAT ")", (intptr_t) r, (intptr_t) r)); return r; }