Add patch for a bug in Lua 5.3.3
This commit is contained in:
parent
ac3507688a
commit
83ac3076b7
28
hererocks.py
28
hererocks.py
@ -836,6 +836,31 @@ class RioLua(Lua):
|
|||||||
for (src = gm->src; src <= gm->ms.src_end; src++) {
|
for (src = gm->src; src <= gm->ms.src_end; src++) {
|
||||||
const char *e;
|
const char *e;
|
||||||
reprepstate(&gm->ms);
|
reprepstate(&gm->ms);
|
||||||
|
""",
|
||||||
|
"Expression list with four or more expressions in a 'for' loop can crash the interpreter": """
|
||||||
|
lparser.c:
|
||||||
|
@@ -323,6 +323,8 @@
|
||||||
|
luaK_nil(fs, reg, extra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ if (nexps > nvars)
|
||||||
|
+ ls->fs->freereg -= nexps - nvars; /* remove extra values */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1160,11 +1162,8 @@
|
||||||
|
int nexps;
|
||||||
|
checknext(ls, '=');
|
||||||
|
nexps = explist(ls, &e);
|
||||||
|
- if (nexps != nvars) {
|
||||||
|
+ if (nexps != nvars)
|
||||||
|
adjust_assign(ls, nvars, nexps, &e);
|
||||||
|
- if (nexps > nvars)
|
||||||
|
- ls->fs->freereg -= nexps - nvars; /* remove extra values */
|
||||||
|
- }
|
||||||
|
else {
|
||||||
|
luaK_setoneret(ls->fs, &e); /* close last expression */
|
||||||
|
luaK_storevar(ls->fs, &lh->v, &e);
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
patches_per_version = {
|
patches_per_version = {
|
||||||
@ -849,6 +874,9 @@ class RioLua(Lua):
|
|||||||
"Metatable may access its own deallocated field when it has a self reference in __newindex",
|
"Metatable may access its own deallocated field when it has a self reference in __newindex",
|
||||||
"Label between local definitions can mix-up their initializations",
|
"Label between local definitions can mix-up their initializations",
|
||||||
"gmatch iterator fails when called from a coroutine different from the one that created it"
|
"gmatch iterator fails when called from a coroutine different from the one that created it"
|
||||||
|
],
|
||||||
|
"3": [
|
||||||
|
"Expression list with four or more expressions in a 'for' loop can crash the interpreter"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user