mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fixed bug #74623
This commit is contained in:
parent
4948da178a
commit
5b5a92b8b6
4
NEWS
4
NEWS
@ -7,6 +7,10 @@ PHP NEWS
|
||||
(jhdxr)
|
||||
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74623 (Infinite loop in type inference when using HTMLPurifier).
|
||||
(nikic)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
|
||||
|
||||
|
@ -3109,7 +3109,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||
opline->opcode == ZEND_FETCH_OBJ_RW ||
|
||||
opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG) {
|
||||
if (opline->opcode != ZEND_FETCH_DIM_FUNC_ARG) {
|
||||
if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_NULL)) {
|
||||
if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
|
||||
tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE);
|
||||
tmp |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN;
|
||||
}
|
||||
|
22
ext/opcache/tests/bug74623.phpt
Normal file
22
ext/opcache/tests/bug74623.phpt
Normal file
@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #74623: Infinite loop in type inference when using HTMLPurifier
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function crash($arr) {
|
||||
$current_item = false;
|
||||
|
||||
foreach($arr as $item) {
|
||||
if($item->name === 'string') {
|
||||
$current_item = $item;
|
||||
} else {
|
||||
$current_item->a[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user