Skip to content

Commit ba7aa6c

Browse files
committed
Reinstate memset to -1
1 parent 2b7f4c2 commit ba7aa6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/Optimizer/dce.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ int dce_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *optimizer
546546

547547
/* Optimistically assume all instructions and phis to be dead */
548548
ctx.instr_dead = zend_arena_calloc(&optimizer_ctx->arena, ctx.instr_worklist_len, sizeof(zend_ulong));
549-
ctx.phi_dead = zend_arena_calloc(&optimizer_ctx->arena, ctx.phi_worklist_len, sizeof(zend_ulong));
549+
ctx.phi_dead = zend_arena_alloc(&optimizer_ctx->arena, ctx.phi_worklist_len * sizeof(zend_ulong));
550+
memset(ctx.phi_dead, 0xff, sizeof(zend_ulong) * ctx.phi_worklist_len);
550551

551552
/* Mark non-CV phis as live. Even if the result is unused, we generally cannot remove one
552553
* of the producing instructions, as it combines producing the result with control flow.

0 commit comments

Comments
 (0)