Call zend_generator_check_placeholder_frame() only for frames with

ZEND_CALL_GENERATOR flag
This commit is contained in:
Dmitry Stogov 2021-04-13 15:25:05 +03:00
parent 7bd0b1078b
commit a439d9f232

View file

@ -1709,7 +1709,9 @@ ZEND_FUNCTION(debug_print_backtrace)
call_type = NULL;
ZVAL_UNDEF(&arg_array);
if (UNEXPECTED((ZEND_CALL_INFO(call) & ZEND_CALL_GENERATOR) != 0)) {
ptr = zend_generator_check_placeholder_frame(ptr);
}
skip = ptr;
/* skip internal handler */
@ -1911,7 +1913,9 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
stack_frame = zend_new_array(8);
zend_hash_real_init_mixed(stack_frame);
if (UNEXPECTED((ZEND_CALL_INFO(call) & ZEND_CALL_GENERATOR) != 0)) {
ptr = zend_generator_check_placeholder_frame(ptr);
}
skip = ptr;
/* skip internal handler */