mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix GH-18037: SEGV Zend/zend_execute.c
This commit is contained in:
@@ -4213,6 +4213,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:
|
||||
|
||||
24
ext/opcache/tests/jit/gh18037.phpt
Normal file
24
ext/opcache/tests/jit/gh18037.phpt
Normal file
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
GH-18037 (SEGV Zend/zend_execute.c)
|
||||
--EXTENSIONS--
|
||||
opcache
|
||||
--INI--
|
||||
opcache.jit=1201
|
||||
--FILE--
|
||||
<?php
|
||||
function test_helper()
|
||||
{
|
||||
$list = [];
|
||||
\in_array($list[0], $list, true) !== $list->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
|
||||
Reference in New Issue
Block a user