Skip to content

Commit e482785

Browse files
committedOct 30, 2023
Fixed codegeneration for FETCH_DIM_IS
Fixes oss-fuzz #63666
1 parent c8cb68a commit e482785

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎ext/opcache/jit/zend_jit_ir.c

+4
Original file line numberDiff line numberDiff line change
@@ -12095,6 +12095,10 @@ static int zend_jit_fetch_dim_read(zend_jit_ctx *jit,
1209512095
jit_ZVAL_COPY(jit, res_addr, -1, val_addr, res_info, 1);
1209612096
}
1209712097

12098+
ir_END_list(end_inputs);
12099+
} else if (not_found_inputs) {
12100+
ir_MERGE_list(not_found_inputs);
12101+
jit_set_Z_TYPE_INFO(jit, res_addr, IS_NULL);
1209812102
ir_END_list(end_inputs);
1209912103
}
1210012104
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
JIT FETCH_DIM_IS: 001
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.file_update_protection=0
7+
opcache.jit_buffer_size=1M
8+
--FILE--
9+
<?php
10+
const A = [1];
11+
A[-1][2]??$y;
12+
?>
13+
DONE
14+
--EXPECTF--
15+
Warning: Undefined variable $y in %sfetch_dim_is_001.php on line 3
16+
DONE

0 commit comments

Comments
 (0)