lua-users home
lua-l archive

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


> >>>>> "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