[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.6 (rc1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 20 Jul 2020 15:33:42 -0300
> >>>>> "Luiz" == Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>
> Luiz> Lua 5.3.6 fixes all bugs listed in http://www.lua.org/bugs.html#5.3.5 .
>
> Has it been checked whether the 5.4 bug regarding shrinking a just-grown
> stack also exists in 5.3, because my superficial reading of the code
> suggests that it does?
I guess you are talking about this macro:
#define checkstackp(L,n,p) \
luaD_checkstackaux(L, n, \
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
luaC_checkGC(L), /* stack grow uses memory */ \
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
What separates the macro arguments is the comma, not the semicolon.
So, the call to luaC_checkGC is done before the stack reallocation.
-- Roberto