diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index 32c58f24c7cd2..7ff6522ba2c4a 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -4209,6 +4209,7 @@ static int zend_jit_handler(zend_jit_ctx *jit, const zend_op *opline, int may_th case ZEND_ASSIGN_STATIC_PROP_OP: case ZEND_ASSIGN_STATIC_PROP_REF: case ZEND_ASSIGN_OBJ_REF: + case ZEND_FRAMELESS_ICALL_3: zend_jit_set_last_valid_opline(jit, opline + 2); break; default: diff --git a/ext/opcache/tests/jit/gh18037.phpt b/ext/opcache/tests/jit/gh18037.phpt new file mode 100644 index 0000000000000..26de60228e8cb --- /dev/null +++ b/ext/opcache/tests/jit/gh18037.phpt @@ -0,0 +1,24 @@ +--TEST-- +GH-18037 (SEGV Zend/zend_execute.c) +--EXTENSIONS-- +opcache +--INI-- +opcache.jit=1201 +--FILE-- +matches(); +} + +test_helper(); +?> +--EXPECTF-- +Warning: Undefined array key 0 in %s on line %d + +Fatal error: Uncaught Error: Call to a member function matches() on array in %s:%d +Stack trace: +#0 %s(%d): test_helper() +#1 {main} + thrown in %s on line %d