Skip to content

Commit ec2aaaa

Browse files
committed
8326236: assert(ce != nullptr) failed in Continuation::continuation_bottom_sender
Reviewed-by: dholmes, mgronlun
1 parent 02d2493 commit ec2aaaa

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/hotspot/cpu/aarch64/frame_aarch64.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
163163
}
164164

165165
if (Continuation::is_return_barrier_entry(sender_pc)) {
166+
// sender_pc might be invalid so check that the frame
167+
// actually belongs to a Continuation.
168+
if (!Continuation::is_frame_in_continuation(thread, *this)) {
169+
return false;
170+
}
166171
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
167172
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
168173
sender_sp = s.sp();

src/hotspot/cpu/ppc/frame_ppc.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
122122
address sender_pc = (address) sender_abi->lr;
123123

124124
if (Continuation::is_return_barrier_entry(sender_pc)) {
125+
// sender_pc might be invalid so check that the frame
126+
// actually belongs to a Continuation.
127+
if (!Continuation::is_frame_in_continuation(thread, *this)) {
128+
return false;
129+
}
125130
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
126131
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
127132
sender_sp = s.sp();

src/hotspot/cpu/riscv/frame_riscv.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
158158
}
159159

160160
if (Continuation::is_return_barrier_entry(sender_pc)) {
161+
// sender_pc might be invalid so check that the frame
162+
// actually belongs to a Continuation.
163+
if (!Continuation::is_frame_in_continuation(thread, *this)) {
164+
return false;
165+
}
161166
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
162167
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
163168
sender_sp = s.sp();

src/hotspot/cpu/x86/frame_x86.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
154154
}
155155

156156
if (Continuation::is_return_barrier_entry(sender_pc)) {
157+
// sender_pc might be invalid so check that the frame
158+
// actually belongs to a Continuation.
159+
if (!Continuation::is_frame_in_continuation(thread, *this)) {
160+
return false;
161+
}
157162
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
158163
frame s = Continuation::continuation_bottom_sender(thread, *this, sender_sp);
159164
sender_sp = s.sp();

0 commit comments

Comments
 (0)