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:
Niels Dossche 2024-09-09 20:12:07 +02:00
commit f56a659293
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
2 changed files with 22 additions and 1 deletions

View file

@ -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:

View 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