diff options
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 2fba6b6b..2e411632 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1062,7 +1062,8 @@ static TRef rec_upvalue(jit_State *J, uint32_t uv, TRef val) | |||
1062 | uv = (uv << 8) | (hashrot(uvp->dhash, uvp->dhash + HASH_BIAS) & 0xff); | 1062 | uv = (uv << 8) | (hashrot(uvp->dhash, uvp->dhash + HASH_BIAS) & 0xff); |
1063 | if (!uvp->closed) { | 1063 | if (!uvp->closed) { |
1064 | /* In current stack? */ | 1064 | /* In current stack? */ |
1065 | if (uvval(uvp) >= J->L->stack && uvval(uvp) < J->L->maxstack) { | 1065 | if (uvval(uvp) >= tvref(J->L->stack) && |
1066 | uvval(uvp) < tvref(J->L->maxstack)) { | ||
1066 | int32_t slot = (int32_t)(uvval(uvp) - (J->L->base - J->baseslot)); | 1067 | int32_t slot = (int32_t)(uvval(uvp) - (J->L->base - J->baseslot)); |
1067 | if (slot >= 0) { /* Aliases an SSA slot? */ | 1068 | if (slot >= 0) { /* Aliases an SSA slot? */ |
1068 | slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */ | 1069 | slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */ |