[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Crash (and/or going nuts) in case of error in __gc (Lua 5.4)
- From: Andrew Gierth <andrew@...>
- Date: Tue, 18 Jun 2019 22:43:42 +0100
>>>>> "Sean" == Sean Conner <sean@conman.org> writes:
>> I originally got this in my (C++ bridge) library where results were
>> even more weird, including runtime errors (accusing me in calling
>> table), syntax errors, segfaults, double-frees and more.
Sean> I was able to reproduce the issue (also Linux, but not Ubuntu)
Sean> with the version mentioned above.
Looks to me like a stack error; the error object left on the stack by
luaD_pcall is never popped, so the state of the stack is messed up by
the garbage collector. The subsequent error will depend on where the GC
was invoked from, so it's likely to be quite variable.
I guess there needs to be an L->top -= 1; after the luaE_warning calls.
--
Andrew.