Skip to content

Commit ebb3396

Browse files
committed
Aliased varaibles may escape
1 parent fb571f2 commit ebb3396

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/opcache/Optimizer/escape_analysis.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,10 @@ int zend_ssa_escape_analysis(zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
356356
/* 2. Identify Allocations */
357357
num_non_escaped = 0;
358358
for (i = 0; i < ssa_vars_count; i++) {
359-
if (ssa_vars[i].definition >= 0) {
359+
if (ssa_vars[i].alias) {
360+
root = ees[i];
361+
ssa_vars[root].escape_state = ESCAPE_STATE_GLOBAL_ESCAPE;
362+
} else if (ssa_vars[i].definition >= 0) {
360363
root = ees[i];
361364
if (ssa_vars[root].escape_state == ESCAPE_STATE_UNKNOWN) {
362365
if (is_allocation_def(op_array, ssa, ssa_vars[i].definition, i)) {

0 commit comments

Comments
 (0)