From d78b71f63f4f2a6ce157bf565b628c936919b8fe Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sun, 29 Oct 2017 20:33:46 -0400 Subject: apply known upstream bugfixes --- lua-5.3.4-bug1.patch | 12 ++++++++++++ lua-5.3.4-bug4.patch | 11 +++++++++++ lua.spec | 14 ++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 lua-5.3.4-bug1.patch create mode 100644 lua-5.3.4-bug4.patch diff --git a/lua-5.3.4-bug1.patch b/lua-5.3.4-bug1.patch new file mode 100644 index 0000000..f03aab9 --- /dev/null +++ b/lua-5.3.4-bug1.patch @@ -0,0 +1,12 @@ +diff -up lua-5.3.4/src/lparser.c.bug1 lua-5.3.4/src/lparser.c +--- lua-5.3.4/src/lparser.c.bug1 2017-08-02 16:03:43.730247916 -0400 ++++ lua-5.3.4/src/lparser.c 2017-08-02 16:03:56.507957260 -0400 +@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *l + luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ + enterblock(fs, &bl, 0); /* must enter block before 'goto' */ + gotostat(ls, v.t); /* handle goto/break */ +- skipnoopstat(ls); /* skip other no-op statements */ ++ while (testnext(ls, ';')) {} /* skip colons */ + if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ + leaveblock(fs); + return; /* and that is it */ diff --git a/lua-5.3.4-bug4.patch b/lua-5.3.4-bug4.patch new file mode 100644 index 0000000..d1a3951 --- /dev/null +++ b/lua-5.3.4-bug4.patch @@ -0,0 +1,11 @@ +diff -up lua-5.3.4/src/ldebug.c.bug4 lua-5.3.4/src/ldebug.c +--- lua-5.3.4/src/ldebug.c.bug4 2017-08-02 16:05:36.985671687 -0400 ++++ lua-5.3.4/src/ldebug.c 2017-08-02 16:05:55.257256062 -0400 +@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, con + CallInfo *ci = L->ci; + const char *msg; + va_list argp; ++ luaC_checkGC(L); /* error message uses memory */ + va_start(argp, fmt); + msg = luaO_pushvfstring(L, fmt, argp); /* format message */ + va_end(argp); diff --git a/lua.spec b/lua.spec index 125c98a..183b532 100644 --- a/lua.spec +++ b/lua.spec @@ -12,7 +12,7 @@ Name: lua Version: %{major_version}.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Powerful light-weight programming language Group: Development/Languages License: MIT @@ -39,6 +39,10 @@ Patch6: %{name}-5.2.2-idsize.patch Patch7: %{name}-5.2.2-luac-shared-link-fix.patch Patch8: %{name}-5.2.2-configure-compat-module.patch %endif +# https://www.lua.org/bugs.html +Patch9: lua-5.3.4-bug1.patch +Patch10: lua-5.3.4-bug4.patch +Patch11: lua-5.3.4-bug5.patch BuildRequires: automake autoconf libtool readline-devel ncurses-devel Provides: lua(abi) = %{major_version} @@ -91,7 +95,10 @@ mv src/luaconf.h src/luaconf.h.template.in #%% patch2 -p1 -z .luac-shared %patch3 -p1 -z .configure-linux %patch4 -p1 -z .configure-compat-all -autoreconf -i +%patch9 -p1 -b .bug1 +%patch10 -p1 -b .bug4 +%patch11 -p1 -b .bug5 +autoreconf -ifv %if 0%{?bootstrap} cd lua-%{bootstrap_version}/ @@ -211,6 +218,9 @@ install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua %changelog +* Sun Oct 29 2017 Tom Callaway - 5.3.4-6 +- apply known upstream bugfixes + * Thu Aug 03 2017 Fedora Release Engineering - 5.3.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild -- cgit