Add missing check for LJ_KEYINDEX in ITERN recording.
Reported by dragonorloong. Analyzed by vfprintf. #827
This commit is contained in:
@@ -675,7 +675,8 @@ static LoopEvent rec_itern(jit_State *J, BCReg ra, BCReg rb)
|
||||
lj_snap_add(J); /* Required to make JLOOP the first ins in a side-trace. */
|
||||
ix.tab = getslot(J, ra-2);
|
||||
ix.key = J->base[ra-1] ? J->base[ra-1] :
|
||||
sloadt(J, (int32_t)(ra-1), IRT_INT, IRSLOAD_KEYINDEX);
|
||||
sloadt(J, (int32_t)(ra-1), IRT_GUARD|IRT_INT,
|
||||
IRSLOAD_TYPECHECK|IRSLOAD_KEYINDEX);
|
||||
copyTV(J->L, &ix.tabv, &J->L->base[ra-2]);
|
||||
copyTV(J->L, &ix.keyv, &J->L->base[ra-1]);
|
||||
ix.idxchain = (rb < 3); /* Omit value type check, if unused. */
|
||||
|
||||
Reference in New Issue
Block a user