Skip to content

Commit 6cef7ad

Browse files
reinrichpron
authored andcommittedMay 4, 2022
frame::describe: fix stack parameter location.
Reviewed-by: rpressler, rehn
1 parent 04a475b commit 6cef7ad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/hotspot/share/runtime/frame.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1441,8 +1441,9 @@ void frame::describe(FrameValues& values, int frame_no, const RegisterMap* reg_m
14411441
}
14421442
assert(sig_index == sizeargs, "");
14431443
}
1444-
int out_preserve = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
1445-
assert(out_preserve == m->num_stack_arg_slots(), "");
1444+
int stack_arg_slots = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
1445+
assert(stack_arg_slots == m->num_stack_arg_slots(), "");
1446+
int out_preserve = SharedRuntime::out_preserve_stack_slots();
14461447
int sig_index = 0;
14471448
int arg_index = (m->is_static() ? 0 : -1);
14481449
for (SignatureStream ss(m->signature()); !ss.at_return_type(); ) {
@@ -1453,7 +1454,7 @@ void frame::describe(FrameValues& values, int frame_no, const RegisterMap* reg_m
14531454
VMReg fst = regs[sig_index].first();
14541455
if (fst->is_stack()) {
14551456
assert(((int)fst->reg2stack()) >= 0, "reg2stack: " INTPTR_FORMAT, fst->reg2stack());
1456-
int offset = fst->reg2stack() * VMRegImpl::stack_slot_size + stack_slot_offset;
1457+
int offset = (fst->reg2stack() + out_preserve) * VMRegImpl::stack_slot_size + stack_slot_offset;
14571458
intptr_t* stack_address = (intptr_t*)((address)unextended_sp() + offset);
14581459
if (at_this) {
14591460
values.describe(frame_no, stack_address, err_msg("this for #%d", frame_no), 1);

0 commit comments

Comments
 (0)
Please sign in to comment.