diff --git a/src/host/buildvm_lib.c b/src/host/buildvm_lib.c index 8914251e..ffc1b2ca 100644 --- a/src/host/buildvm_lib.c +++ b/src/host/buildvm_lib.c @@ -378,7 +378,8 @@ void emit_lib(BuildCtx *ctx) char *p; /* Simplistic pre-processor. Only handles top-level #if/#endif. */ if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { - int ok = 1, len = strlen(buf); + int ok = 1; + size_t len = strlen(buf); if (buf[len-1] == '\n') { buf[len-1] = 0; if (buf[len-2] == '\r') { diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c index 455b0ca6..07dab0d9 100644 --- a/src/lj_opt_mem.c +++ b/src/lj_opt_mem.c @@ -229,8 +229,8 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) if (key->o == IR_KSLOT) key = IR(key->op1); lj_ir_kvalue(J->L, &keyv, key); tv = lj_tab_get(J->L, ir_ktab(IR(ir->op1)), &keyv); - lj_assertJ(itype2irt(tv) == irt_type(fins->t), - "mismatched type in constant table"); + if (itype2irt(tv) != irt_type(fins->t)) + return 0; /* Type instability in loop-carried dependency. */ if (irt_isnum(fins->t)) return lj_ir_knum_u64(J, tv->u64); else if (LJ_DUALNUM && irt_isint(fins->t))