[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Upgrading Lua 5.4.2 to 5.4.3+ in a C++ project leads to PANIC
- From: Patrick Kurth <p.kurth@...>
- Date: Mon, 05 Dec 2022 23:07:30 +0000
On Mon, 2022-12-05 at 17:11 +0100, Aleksandr Zenkov wrote:
> Thank you for the reply.
> Actually no, the Lua script is loaded all the time during runtime.
> Lua functions within the script are called using lua_getglobal, here
> the exact C++ caller function:
This function is a bit weird. You emtpy the stack and then get the
number of stack items (line 262, into 'base'), which will always be 0.
Then you push "_TRACEBACK" and the global table, only to (I guess
that's what you want to do) reverse the order of those two.
First of all you call lua_insert with index 0, which is not valid.
Secondly, why use lua_insert at all when you can just push the stuff
you need in the right order?
Anyway, I'd start with checking the indices, maybe I'm missing
something here, but this caught my attention.