File tree 4 files changed +20
-0
lines changed
4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
163
163
}
164
164
165
165
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
+ }
166
171
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
167
172
frame s = Continuation::continuation_bottom_sender (thread, *this , sender_sp);
168
173
sender_sp = s.sp ();
Original file line number Diff line number Diff line change @@ -122,6 +122,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
122
122
address sender_pc = (address) sender_abi->lr ;
123
123
124
124
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
+ }
125
130
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
126
131
frame s = Continuation::continuation_bottom_sender (thread, *this , sender_sp);
127
132
sender_sp = s.sp ();
Original file line number Diff line number Diff line change @@ -158,6 +158,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
158
158
}
159
159
160
160
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
+ }
161
166
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
162
167
frame s = Continuation::continuation_bottom_sender (thread, *this , sender_sp);
163
168
sender_sp = s.sp ();
Original file line number Diff line number Diff line change @@ -154,6 +154,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
154
154
}
155
155
156
156
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
+ }
157
162
// If our sender_pc is the return barrier, then our "real" sender is the continuation entry
158
163
frame s = Continuation::continuation_bottom_sender (thread, *this , sender_sp);
159
164
sender_sp = s.sp ();
You can’t perform that action at this time.
0 commit comments