[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4.2 crashes where Lua 5.3.6 does not
- From: Sean Conner <sean@...>
- Date: Sat, 19 Dec 2020 17:21:40 -0500
It was thus said that the Great Andrew Gierth once stated:
> >>>>> "Viacheslav" == Viacheslav Usov <via.usov@gmail.com> writes:
>
> >> And indeed, what you do to the stack in the deentify / deentifyn
> >> functions is a classic example of violating the luaL_Buffer protocol
> >> - you're assuming you can push something, do an addstring, and then
> >> pop the thing that you pushed - but this is explicitly forbidden,
> >> since addstring is allowed to push new entries on the stack.
>
> Viacheslav> Is this the same thing as in
> Viacheslav> http://lua-users.org/lists/lua-l/2017-11/msg00004.html?
>
> Seems so.
It was. Philipp Janda replied directly to me (late last night/very early
this morning) pointing out the issue and when I made the appropriate change
(to use luaL_addvalue()) the crash went away.
Thank you Philipp, Andrew and Usov for your help. I was too close to the
code to see the problem (and completely forgot about the stack balance when
using a luaL_Buffer).
-spc