Skip to content

Commit 7e1ea51

Browse files
Andrei Panginshipilev
Andrei Pangin
authored andcommittedOct 29, 2024
8339133: [8u] Profiler crashes at guarantee(is_result_safe || is_in_asgct()): unsafe access to zombie method
Reviewed-by: stuefe, shade
1 parent 31b8804 commit 7e1ea51

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎hotspot/src/share/vm/prims/forte.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
553553
return;
554554
}
555555

556-
// !important! make sure all to call thread->set_in_asgct(false) before every return
556+
// !important! make sure all to call thread->set_in_asgct(saved_in_asgct) before every return
557+
bool saved_in_asgct = thread->in_asgct();
557558
thread->set_in_asgct(true);
558559

559560
switch (thread->thread_state()) {
@@ -613,7 +614,7 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
613614
trace->num_frames = ticks_unknown_state; // -7
614615
break;
615616
}
616-
thread->set_in_asgct(false);
617+
thread->set_in_asgct(saved_in_asgct);
617618
}
618619

619620

0 commit comments

Comments
 (0)
Please sign in to comment.