You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assertion failure at Zend/zend_vm_execute.h:7469 #16799
This happens because using static in callables causes a deprecation warning in zend_is_callable_ex and the error handler unfortunately transforms that into an exception.
Possible fix, but would have to think a bit more:
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 2a48b9c3713..95b2b1eba19 100644
--- a/Zend/zend_vm_def.h+++ b/Zend/zend_vm_def.h@@ -3806,6 +3806,13 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM)
SAVE_OPLINE();
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
+ /* Deprecation can be emitted from zend_is_callable_ex(), and then+ * transformed into an exception. */+ if (UNEXPECTED(EG(exception))) {+ FREE_OP2();+ HANDLE_EXCEPTION();+ }+
ZEND_ASSERT(!error);
func = fcc.function_handler;
object_or_called_scope = fcc.called_scope;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 3bc01a597fa..ef49815ee44 100644
--- a/Zend/zend_vm_execute.h+++ b/Zend/zend_vm_execute.h@@ -7022,6 +7022,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
SAVE_OPLINE();
function_name = RT_CONSTANT(opline, opline->op2);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
+ /* Deprecation can be emitted from zend_is_callable_ex(), and then+ * transformed into an exception. */+ if (UNEXPECTED(EG(exception))) {++ HANDLE_EXCEPTION();+ }+
ZEND_ASSERT(!error);
func = fcc.function_handler;
object_or_called_scope = fcc.called_scope;
@@ -9367,6 +9374,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
SAVE_OPLINE();
function_name = _get_zval_ptr_var(opline->op2.var EXECUTE_DATA_CC);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
+ /* Deprecation can be emitted from zend_is_callable_ex(), and then+ * transformed into an exception. */+ if (UNEXPECTED(EG(exception))) {+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));+ HANDLE_EXCEPTION();+ }+
ZEND_ASSERT(!error);
func = fcc.function_handler;
object_or_called_scope = fcc.called_scope;
@@ -11741,6 +11755,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
SAVE_OPLINE();
function_name = _get_zval_ptr_cv_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
+ /* Deprecation can be emitted from zend_is_callable_ex(), and then+ * transformed into an exception. */+ if (UNEXPECTED(EG(exception))) {++ HANDLE_EXCEPTION();+ }+
ZEND_ASSERT(!error);
func = fcc.function_handler;
object_or_called_scope = fcc.called_scope;
Activity
ndossche commentedon Nov 14, 2024
Reproduces in 8.2 too.
ndossche commentedon Nov 14, 2024
This happens because using static in callables causes a deprecation warning in
zend_is_callable_exand the error handler unfortunately transforms that into an exception.Possible fix, but would have to think a bit more:
Fix GH-16799: Assertion failure at Zend/zend_vm_execute.h:7469
Merge branch 'PHP-8.2' into PHP-8.3
Merge branch 'PHP-8.3' into PHP-8.4
Merge branch 'PHP-8.4'