Mercurial > hg > truffle
diff src/cpu/sparc/vm/methodHandles_sparc.cpp @ 3449:a9b8b43b115f
7052219: JSR 292: Crash in ~BufferBlob::MethodHandles adapters
Reviewed-by: twisti, kvn, jrose
author | never |
---|---|
date | Tue, 14 Jun 2011 14:41:33 -0700 |
parents | f7d55ea6ee56 |
children | 38fa55e5e792 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Jun 16 19:26:33 2011 -0700 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Jun 14 14:41:33 2011 -0700 @@ -270,7 +270,7 @@ // Emit code to verify that FP is pointing at a valid ricochet frame. #ifdef ASSERT enum { - ARG_LIMIT = 255, SLOP = 35, + ARG_LIMIT = 255, SLOP = 45, // use this parameter for checking for garbage stack movements: UNREASONABLE_STACK_MOVE = (ARG_LIMIT + SLOP) // the slop defends against false alarms due to fencepost errors @@ -1581,14 +1581,17 @@ // argslot = src_addr + swap_bytes // destslot = dest_addr // while (argslot <= destslot) *(argslot - swap_bytes) = *(argslot + 0), argslot++; - __ add(O1_destslot, wordSize, O1_destslot); + // dest_slot denotes an exclusive upper limit + int limit_bias = OP_ROT_ARGS_DOWN_LIMIT_BIAS; + if (limit_bias != 0) + __ add(O1_destslot, - limit_bias * wordSize, O1_destslot); move_arg_slots_down(_masm, Address(O0_argslot, swap_slots * wordSize), O1_destslot, -swap_slots, O0_argslot, O2_scratch); - __ sub(O1_destslot, wordSize, O1_destslot); + __ sub(O1_destslot, swap_slots * wordSize, O1_destslot); } // pop the original first chunk into the destination slot, now free switch (swap_slots) {