Side effect order in set*value macros
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Side effect order in set*value macros
- From: Sergey Zakharchenko <doublef.mobile@...>
- Date: 2015年10月12日 12:21:10 +0300
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