mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-15661: Access null pointer in Zend/Optimizer/zend_inference.c
This commit is contained in:
commit
f56a659293
2 changed files with 22 additions and 1 deletions
|
@ -5040,7 +5040,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
|
|||
return 0;
|
||||
case ZEND_BIND_GLOBAL:
|
||||
if ((opline+1)->opcode == ZEND_BIND_GLOBAL) {
|
||||
return zend_may_throw(opline + 1, ssa_op + 1, op_array, ssa);
|
||||
return zend_may_throw(opline + 1, ssa_op ? ssa_op + 1 : NULL, op_array, ssa);
|
||||
}
|
||||
return 0;
|
||||
case ZEND_ADD:
|
||||
|
|
21
ext/opcache/tests/jit/gh15666.phpt
Normal file
21
ext/opcache/tests/jit/gh15666.phpt
Normal file
|
@ -0,0 +1,21 @@
|
|||
--TEST--
|
||||
GH-15661 (Access null pointer in Zend/Optimizer/zend_inference.c)
|
||||
--EXTENSIONS--
|
||||
opcache
|
||||
--INI--
|
||||
opcache.jit=1201
|
||||
opcache.jit_buffer_size=64M
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
require 'dummy.inc';
|
||||
global $foo, $bar;
|
||||
$foo |= $bar;
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Done
|
Loading…
Add table
Add a link
Reference in a new issue