From 704280fb80d5320b20f6cd20cfbf009a999164f0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 18 Feb 2015 16:00:15 +0100 Subject: [PATCH] FFI: Prevent DSE across ffi.string(). --- src/lj_opt_mem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c index f4e3cd3a..a4d96fc0 100644 --- a/src/lj_opt_mem.c +++ b/src/lj_opt_mem.c @@ -793,6 +793,7 @@ TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J) IRRef ref = *refp; if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS]; if (J->chain[IR_XBAR] > lim) lim = J->chain[IR_XBAR]; + if (J->chain[IR_XSNEW] > lim) lim = J->chain[IR_XSNEW]; while (ref > lim) { /* Search for redundant or conflicting stores. */ IRIns *store = IR(ref); switch (aa_xref(J, xr, fins, store)) {