Commit cb3579d
authored
Fix zend_jit_trace_find_init_fcall_op() (#23449)
zend_jit_trace_find_init_fcall_op() tries to find the INIT_FCALL opline
corresponding to a ZEND_JIT_TRACE_INIT_CALL record, but it fails to do so in the
ZEND_JIT_TRACE_FAKE_INIT_CALL case, for nested calls.
The first loop is supposed to find the first opline after the sequence of
ZEND_JIT_TRACE_INIT_CALL record, but it mistakenly decrements 'p' after
initially incrementing it. As a result 'p' eventually points to an invalid
record.
It works for non-nested calls because the 'p->op == ZEND_JIT_TRACE_VM' condition
is true on the first iteration in that case.
This can not lead to a crash or miscompilations, but this results in lost
optimization opportunities.1 parent 48d2b45 commit cb3579d
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1167 | 1167 | | |
1168 | 1168 | | |
1169 | 1169 | | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1170 | 1173 | | |
1171 | 1174 | | |
1172 | 1175 | | |
| |||
1178 | 1181 | | |
1179 | 1182 | | |
1180 | 1183 | | |
1181 | | - | |
| 1184 | + | |
1182 | 1185 | | |
| 1186 | + | |
1183 | 1187 | | |
1184 | 1188 | | |
1185 | 1189 | | |
| |||
0 commit comments