1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fixed IR construction

Fixes oss-fuzz #63857
This commit is contained in:
Dmitry Stogov
2023-11-07 13:25:09 +03:00
parent a30d809290
commit 3a3d83625b
2 changed files with 28 additions and 0 deletions

View File

@@ -12123,6 +12123,8 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
ir_MERGE_list(not_found_inputs);
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
ir_END_list(end_inputs);
} else if (!end_inputs && jit->ctx.control) {
ir_END_list(end_inputs); /* dead code */
}
}

View File

@@ -0,0 +1,26 @@
--TEST--
JIT FETCH_DIM_R: 017
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function test() {
$j = 0;
for ($i = 0; $i < 20; $i++) {
$obj->prop0 = $a =! --$a > $a =! --$a + $a = ($array[$a]);
$obj->prop0 = $a =! --$a > $a =! --$a + $a = ($array[$a]);
$array = array(312 > 0);
$a = ($array[$a]);
}
}
try {
@test();
} catch (Throwable $ex) {
}
?>
DONE
--EXPECT--
DONE