Fix backtraces with overridden zend_execute_ex

This commit is contained in:
Nikita Popov 2021-09-29 16:22:48 +02:00
parent 96ac919957
commit 018ddba9ae
2 changed files with 31 additions and 1 deletions

View file

@ -1820,7 +1820,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp);
skip_frame:
if (UNEXPECTED((ZEND_CALL_INFO(call) & ZEND_CALL_TOP_FUNCTION) != 0)
if (UNEXPECTED(ZEND_CALL_KIND(call) == ZEND_CALL_TOP_FUNCTION)
&& !fake_frame
&& prev
&& prev->func