Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk19 Public archive

Commit

Permalink
8286103: VThreadMonitorTest fails "assert(!current->cont_fastpath() |…
Browse files Browse the repository at this point in the history
…| (current->cont_fastpath_thread_state() && !interpreted_native_or_deoptimized_on_stack(current))) failed"

Reviewed-by: sspitsyn, pchilanomate
  • Loading branch information
pron authored and Serguei Spitsyn committed Jun 21, 2022
1 parent 97200a7 commit 198cec9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hotspot/share/runtime/continuationFreezeThaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,9 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n
_align_size += frame::align_wiggle; // we add one whether or not we've aligned because we add it in freeze_interpreted_frame
}

// new_stack_frame must construct the resulting frame using hf.pc() rather than hf.raw_pc() because the frame is not
// yet laid out in the stack, and so the original_pc is not stored in it.
// As a result, f.is_deoptimized_frame() is always false and we must test hf to know if the frame is deoptimized.
frame f = new_stack_frame<ContinuationHelper::CompiledFrame>(hf, caller, is_bottom_frame);
intptr_t* const stack_frame_top = f.sp();
intptr_t* const heap_frame_top = hf.unextended_sp();
Expand All @@ -2086,7 +2089,9 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n

patch(f, caller, is_bottom_frame);

if (f.is_deoptimized_frame()) {
// f.is_deoptimized_frame() is always false and we must test hf.is_deoptimized_frame() (see comment above)
assert(!f.is_deoptimized_frame(), "");
if (hf.is_deoptimized_frame()) {
maybe_set_fastpath(f.sp());
} else if (_thread->is_interp_only_mode()
|| (_cont.is_preempted() && f.cb()->as_compiled_method()->is_marked_for_deoptimization())) {
Expand Down

1 comment on commit 198cec9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.