File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,6 +169,24 @@ unsafe fn extract_file_and_line(
169169#[ inline]
170170fn frameless_opline_or_prev ( execute_data : & zend_execute_data ) -> Option < & zend_op > {
171171 let opline = safely_get_opline ( execute_data) ?;
172+ if matches ! (
173+ opline. opcode as u32 ,
174+ ZEND_FRAMELESS_ICALL_0
175+ | ZEND_FRAMELESS_ICALL_1
176+ | ZEND_FRAMELESS_ICALL_2
177+ | ZEND_FRAMELESS_ICALL_3
178+ ) {
179+ // Debug aid: crash hard when we observe a frameless icall as the current opline.
180+ // If this never triggers in CI, then allocation sampling is not observing the
181+ // frameless opcode as the current execute_data->opline at sample time.
182+ panic ! (
183+ "Observed FRAMELESS_ICALL opcode ({}) as current opline at execute_data={:p} opline={:p} extended_value={}" ,
184+ opline. opcode as u32 ,
185+ execute_data,
186+ execute_data. opline,
187+ opline. extended_value
188+ ) ;
189+ }
172190 if opline. opcode as u32 != ZEND_OP_DATA {
173191 return Some ( opline) ;
174192 }
@@ -212,7 +230,6 @@ fn frameless_opline_or_prev(execute_data: &zend_execute_data) -> Option<&zend_op
212230 execute_data. opline,
213231 prev_ptr
214232 ) ;
215- Some ( prev)
216233 }
217234 _ => Some ( opline) ,
218235 }
You can’t perform that action at this time.
0 commit comments