# HG changeset patch # User mgronlun # Date 1404583529 -7200 # Node ID 6adf1750b4f47ad615dc556105389b655efffd2e # Parent 1d9e52cddcd0e7a45dc07cf874788f48063cf3ea 8049324: interpretedVFrame::expressions to index oopmap correctly Reviewed-by: sspitsyn, coleenp diff -r 1d9e52cddcd0 -r 6adf1750b4f4 hotspot/src/share/vm/runtime/vframe.cpp --- a/hotspot/src/share/vm/runtime/vframe.cpp Thu Jul 03 16:55:57 2014 -0700 +++ b/hotspot/src/share/vm/runtime/vframe.cpp Sat Jul 05 20:05:29 2014 +0200 @@ -263,6 +263,10 @@ static StackValue* create_stack_value_from_oop_map(const InterpreterOopMap& oop_mask, int index, const intptr_t* const addr) { + + assert(index >= 0 && + index < oop_mask.number_of_entries(), "invariant"); + // categorize using oop_mask if (oop_mask.is_oop(index)) { // reference (oop) "r" @@ -307,6 +311,7 @@ static void stack_expressions(StackValueCollection* result, int length, + int max_locals, const InterpreterOopMap& oop_mask, const frame& fr) { @@ -319,7 +324,10 @@ // Need to ensure no bogus escapes. addr = NULL; } - StackValue* const sv = create_stack_value_from_oop_map(oop_mask, i, addr); + + StackValue* const sv = create_stack_value_from_oop_map(oop_mask, + i + max_locals, + addr); assert(sv != NULL, "sanity check"); result->add(sv); @@ -375,7 +383,7 @@ } if (expressions) { - stack_expressions(result, length, oop_mask, fr()); + stack_expressions(result, length, max_locals, oop_mask, fr()); } else { stack_locals(result, length, oop_mask, fr()); }