[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.6 (rc1) now available
- From: Andrew Gierth <andrew@...>
- Date: Mon, 20 Jul 2020 19:44:44 +0100
>>>>> "Roberto" == Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> 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?
Roberto> I guess you are talking about this macro:
Roberto> #define checkstackp(L,n,p) \
Roberto> luaD_checkstackaux(L, n, \
Roberto> ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
Roberto> luaC_checkGC(L), /* stack grow uses memory */ \
Roberto> p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
Roberto> What separates the macro arguments is the comma, not the
Roberto> semicolon. So, the call to luaC_checkGC is done before the
Roberto> stack reallocation.
Aha. Yes, that explains it.
--
Andrew.