@@ -3092,6 +3092,13 @@ void SharedRuntime::generate_deopt_blob() {
30923092
30933093 // stack: (caller_of_deoptee, ...).
30943094
3095+ // Freezing continuation frames requires that the caller is trimmed to unextended sp if compiled.
3096+ // If not compiled the loaded value is equal to the current SP (see frame::initial_deoptimization_info())
3097+ // and the frame is effectively not resized.
3098+ Register caller_sp = R23_tmp3;
3099+ __ ld_ptr (caller_sp, Deoptimization::UnrollBlock::initial_info_offset_in_bytes (), unroll_block_reg);
3100+ __ resize_frame_absolute (caller_sp, R24_tmp4, R25_tmp5);
3101+
30953102 // Loop through the `UnrollBlock' info and create interpreter frames.
30963103 push_skeleton_frames (masm, true /* deopt*/ ,
30973104 unroll_block_reg,
@@ -3227,6 +3234,13 @@ void SharedRuntime::generate_uncommon_trap_blob() {
32273234 __ asm_assert_eq (" SharedRuntime::generate_deopt_blob: expected Unpack_uncommon_trap" );
32283235#endif
32293236
3237+ // Freezing continuation frames requires that the caller is trimmed to unextended sp if compiled.
3238+ // If not compiled the loaded value is equal to the current SP (see frame::initial_deoptimization_info())
3239+ // and the frame is effectively not resized.
3240+ Register caller_sp = R23_tmp3;
3241+ __ ld_ptr (caller_sp, Deoptimization::UnrollBlock::initial_info_offset_in_bytes (), unroll_block_reg);
3242+ __ resize_frame_absolute (caller_sp, R24_tmp4, R25_tmp5);
3243+
32303244 // Allocate new interpreter frame(s) and possibly a c2i adapter
32313245 // frame.
32323246 push_skeleton_frames (masm, false /* deopt*/ ,
0 commit comments