[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Side effect order in set*value macros
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 12 Oct 2015 09:40:18 -0300
> I have seen multiple occurrences of code looking like this:
>
> setsvalue2s(L, L->top, lua_makeMeAStringPlease(L));
>
> and
>
> #define setsvalue(L,obj,x) { TValue *io = (obj); TString *x_ = (x); ...
>
> but during the execution of lua_makeMeAStringPlease, the stack may get
> reallocated, and io may no longer point to what you would expect. This
> affects at least Lua 5.1.4 and 5.3.0. Is this a known issue?
I don't think the stack may get reallocated during the execution of
'lua_makeMeAStringPlease'. What call sequence would cause that?
-- Roberto