mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Avoid accessing literal operand on nop
This would have create a NOP with a CONST operand ... probably harmless in practice, but we should avoid it.
This commit is contained in:
parent
19888a69b4
commit
fb4405d357
1 changed files with 1 additions and 0 deletions
|
@ -305,6 +305,7 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array,
|
|||
opline->op1.constant = zend_optimizer_add_literal(op_array, val);
|
||||
if (Z_TYPE_P(val) == IS_STRING && Z_STRLEN_P(val) == 0) {
|
||||
MAKE_NOP(opline);
|
||||
return 1;
|
||||
}
|
||||
/* TODO: In a subsequent pass, *after* this step and compacting nops, combine consecutive ZEND_ECHOs using the block information from ssa->cfg */
|
||||
/* (e.g. for ext/opcache/tests/opt/sccp_010.phpt) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue