mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix printing backtrace of fake generator frame
This commit is contained in:
commit
a58df54bc4
3 changed files with 38 additions and 0 deletions
|
@ -1883,6 +1883,16 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
|
|||
}
|
||||
|
||||
while (call && (limit == 0 || frameno < limit)) {
|
||||
if (UNEXPECTED(!call->func)) {
|
||||
/* This is the fake frame inserted for nested generators. Normally,
|
||||
* this frame is preceded by the actual generator frame and then
|
||||
* replaced by zend_generator_check_placeholder_frame() below.
|
||||
* However, the frame is popped before cleaning the stack frame,
|
||||
* which is observable by destructors. */
|
||||
call = zend_generator_check_placeholder_frame(call);
|
||||
ZEND_ASSERT(call->func);
|
||||
}
|
||||
|
||||
zend_execute_data *prev = call->prev_execute_data;
|
||||
|
||||
if (!prev) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue