mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix GH-15661: Access null pointer in Zend/Optimizer/zend_inference.c
Closes GH-15666.
This commit is contained in:
parent
979e68a2ec
commit
86ef8d5466
3 changed files with 26 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -30,6 +30,10 @@ PHP NEWS
|
||||||
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
|
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
|
||||||
Kamil Tekiela)
|
Kamil Tekiela)
|
||||||
|
|
||||||
|
- Opcache:
|
||||||
|
. Fixed bug GH-15661 (Access null pointer in
|
||||||
|
Zend/Optimizer/zend_inference.c). (nielsdos)
|
||||||
|
|
||||||
- Standard:
|
- Standard:
|
||||||
. Fixed bug GH-15552 (Signed integer overflow in ext/standard/scanf.c). (cmb)
|
. Fixed bug GH-15552 (Signed integer overflow in ext/standard/scanf.c). (cmb)
|
||||||
|
|
||||||
|
|
|
@ -4910,7 +4910,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
|
||||||
return 0;
|
return 0;
|
||||||
case ZEND_BIND_GLOBAL:
|
case ZEND_BIND_GLOBAL:
|
||||||
if ((opline+1)->opcode == 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;
|
return 0;
|
||||||
case ZEND_ADD:
|
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