lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Jan 25, 2019, 05:50 Luiz Henrique de Figueiredo < wrote:
> Yes, that's array index out of bounds error.
> Could you please fix it in Luac?
> (for example, to display opcode when opname doesn't exist)

We could fix this opname issue as suggested, but there are probably
other issues like that, eg indexing the constant array or the locvars
array. Keep in mind that luac, like the rest of Lua, assumes that the
bytecode is correct. We have long given up checking bytecode for
correctness. I don't think we want to litter luac with checks that
might give the wrong impression.

Perhaps the best solution here is a fork of luac that does try to deal with such cases.