You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following snippet produces the out-of-bounds warning:
src/luajit -Ohotloop=1 -Ohotexit=1 -e '
local ffi = require("ffi")
local tp = ffi.typeof("double")
local x = 1LL
for _ = 1, 5 do x = tp(x + 1) end
'
lj_snap.c:804:32: runtime error: index 23 out of bounds for type 'intptr_t [16]'
Due to indexing ex->gpr with a fpr register, which number is >= RID_MAX_GPR.
The situation itself is harmless since this is read from spill[256] array and is rewritten in the next if branch. Nevertheless, this is a little bit nasty, and the fix looks simple:
If build LuaJIT with UB finalizer checks enabled:
The following snippet produces the out-of-bounds warning:
Due to indexing
ex->gpr
with a fpr register, which number is >=RID_MAX_GPR
.The situation itself is harmless since this is read from
spill[256]
array and is rewritten in the nextif
branch. Nevertheless, this is a little bit nasty, and the fix looks simple:The text was updated successfully, but these errors were encountered: