Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/Optimizer/zend_optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ zend_function *zend_optimizer_get_called_func(
if (ce) {
zend_string *func_name = Z_STR_P(CRT_CONSTANT(opline->op2) + 1);
zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name);
if (fbc) {
if (fbc && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0;
bool same_scope = fbc->common.scope == op_array->scope;
if (is_public || same_scope) {
Expand Down
20 changes: 20 additions & 0 deletions ext/opcache/tests/gh22071.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
GH-22071: Assertion failure jit_CONST_FUNC_PROTO on abstract static method call
--CREDITS--
YuanchengJiang
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=1205
opcache.jit_buffer_size=16M
--FILE--
<?php
try {
$e = enum_exists('UnitEnum') ? UnitEnum::cases() : [];
} catch (\Throwable $_e) {}
echo "ok\n";
?>
--EXPECT--
ok
Loading