lua-users home
lua-l archive

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




On 20 Aug 2023, at 15:27, Thadeu de Paula <arkt8@proton.me> wrote:

I'm writing a simple tree checker for deep nested tables with unorthodox keys (functions, tables, userdata, threads).

I'm testing it against Lua from versions 5.1 to 5.4 but the call stack is inconsistent in newer versions while Lua 5.1 is showing the expected stack.

I wrote a simple reproducible test:

< snip >

See that on Lua 5.2+ (5.4 inclusive) points to the wrong line.
A workaround is to keep the value of each call on a variable, and use it to call the next step. While I can do this, It is counterintuitive and even make debugging a hard work prone to error.

Thanks
_________________
Thadeu de Paula
https://codeberg.org/waxlab
https://codeberg.org/arkt8

See: https://luac.nl/s/a41697060bf759ba6c2a2fe7b

It seems that the call instructions get the line 18 line information, but the self and loadk instructions do get the expected line information. 

I agree that it would be preferable that the call instruction also has the expected line number.

~b