lua-users home
lua-l archive

Side effect order in set*value macros

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


Hello list,
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?
Best regards,
-- 
DoubleF

AltStyle によって変換されたページ (->オリジナル) /