apply upstream fixes for bug 1 & 2
This commit is contained in:
parent
d6b7c55828
commit
19e01a142e
|
@ -0,0 +1,25 @@
|
||||||
|
diff -up lua-5.3.3/src/lparser.c.crashfix lua-5.3.3/src/lparser.c
|
||||||
|
--- lua-5.3.3/src/lparser.c.crashfix 2016-07-25 16:00:14.206121141 -0400
|
||||||
|
+++ lua-5.3.3/src/lparser.c 2016-07-25 16:00:51.910865872 -0400
|
||||||
|
@@ -323,6 +323,8 @@ static void adjust_assign (LexState *ls,
|
||||||
|
luaK_nil(fs, reg, extra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ if (nexps > nvars)
|
||||||
|
+ ls->fs->freereg -= nexps - nvars; /* remove extra values */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1160,11 +1162,8 @@ static void assignment (LexState *ls, st
|
||||||
|
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);
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff -up lua-5.3.3/src/loslib.c.readpast lua-5.3.3/src/loslib.c
|
||||||
|
--- lua-5.3.3/src/loslib.c.readpast 2016-07-25 16:04:13.916465061 -0400
|
||||||
|
+++ lua-5.3.3/src/loslib.c 2016-07-25 16:04:19.756423878 -0400
|
||||||
|
@@ -260,7 +260,8 @@ static int getfield (lua_State *L, const
|
||||||
|
static const char *checkoption (lua_State *L, const char *conv, char *buff) {
|
||||||
|
const char *option;
|
||||||
|
int oplen = 1;
|
||||||
|
- for (option = LUA_STRFTIMEOPTIONS; *option != '\0'; option += oplen) {
|
||||||
|
+ int convlen = (int)strlen(conv);
|
||||||
|
+ for (option = LUA_STRFTIMEOPTIONS; *option != '\0' && oplen <= convlen; option += oplen) {
|
||||||
|
if (*option == '|') /* next block? */
|
||||||
|
oplen++; /* next length */
|
||||||
|
else if (memcmp(conv, option, oplen) == 0) { /* match? */
|
11
lua.spec
11
lua.spec
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
Name: lua
|
Name: lua
|
||||||
Version: %{major_version}.3
|
Version: %{major_version}.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Powerful light-weight programming language
|
Summary: Powerful light-weight programming language
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: MIT
|
License: MIT
|
||||||
|
@ -34,6 +34,10 @@ Patch6: %{name}-5.2.2-idsize.patch
|
||||||
Patch7: %{name}-5.2.2-luac-shared-link-fix.patch
|
Patch7: %{name}-5.2.2-luac-shared-link-fix.patch
|
||||||
Patch8: %{name}-5.2.2-configure-compat-module.patch
|
Patch8: %{name}-5.2.2-configure-compat-module.patch
|
||||||
%endif
|
%endif
|
||||||
|
# https://www.lua.org/bugs.html#5.3.3-1
|
||||||
|
Patch9: lua-5.3.3-upstream-bug-1.patch
|
||||||
|
# https://www.lua.org/bugs.html#5.3.3-2
|
||||||
|
Patch10: lua-5.3.3-upstream-bug-2.patch
|
||||||
|
|
||||||
BuildRequires: automake autoconf libtool readline-devel ncurses-devel
|
BuildRequires: automake autoconf libtool readline-devel ncurses-devel
|
||||||
Provides: lua(abi) = %{major_version}
|
Provides: lua(abi) = %{major_version}
|
||||||
|
@ -75,6 +79,8 @@ mv src/luaconf.h src/luaconf.h.template.in
|
||||||
#%% patch2 -p1 -z .luac-shared
|
#%% patch2 -p1 -z .luac-shared
|
||||||
%patch3 -p1 -z .configure-linux
|
%patch3 -p1 -z .configure-linux
|
||||||
%patch4 -p1 -z .configure-compat-all
|
%patch4 -p1 -z .configure-compat-all
|
||||||
|
%patch9 -p1 -b .crashfix
|
||||||
|
%patch10 -p1 -b .readpast
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
|
|
||||||
%if 0%{?bootstrap}
|
%if 0%{?bootstrap}
|
||||||
|
@ -187,6 +193,9 @@ popd
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 25 2016 Tom Callaway <spot@fedoraproject.org> - 5.3.3-2
|
||||||
|
- apply fixes for upstream bug 1 & 2
|
||||||
|
|
||||||
* Tue Jun 7 2016 Tom Callaway <spot@fedoraproject.org> - 5.3.3-1
|
* Tue Jun 7 2016 Tom Callaway <spot@fedoraproject.org> - 5.3.3-1
|
||||||
- update to 5.3.3
|
- update to 5.3.3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue