Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package lua54 for openSUSE:Factory checked in at 2021-03-15 10:53:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lua54 (Old) and /work/SRC/openSUSE:Factory/.lua54.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lua54" Mon Mar 15 10:53:30 2021 rev:8 rq:878379 version:5.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/lua54/lua54.changes 2021-02-04 20:24:14.726841907 +0100 +++ /work/SRC/openSUSE:Factory/.lua54.new.2401/lua54.changes 2021-03-15 10:53:32.125092064 +0100 @@ -1,0 +2,6 @@ +Thu Mar 11 17:10:14 UTC 2021 - Callum Farmer <[email protected]> + +- Add upstream-bugs.patch and upstream-bugs-test.patch to fix + bugs 2,3,4 for build and tests respectively. + +------------------------------------------------------------------- New: ---- upstream-bugs-test.patch upstream-bugs.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lua54.spec ++++++ --- /var/tmp/diff_new_pack.EMrIEj/_old 2021-03-15 10:53:33.085093538 +0100 +++ /var/tmp/diff_new_pack.EMrIEj/_new 2021-03-15 10:53:33.089093544 +0100 @@ -42,7 +42,8 @@ Patch2: files_test.patch Patch3: main_test.patch # PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2 -#Patch4: upstream-bugs.patch +Patch4: upstream-bugs.patch +Patch5: upstream-bugs-test.patch %if "%{flavor}" == "test" BuildRequires: lua54 %else @@ -138,9 +139,11 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch5 -p1 %else %setup -q -n lua-%{version} %patch0 -p1 +%patch4 -p1 %endif # manpage ++++++ upstream-bugs-test.patch ++++++ --- a/db.lua +++ b/db.lua @@ -31,6 +31,7 @@ end do assert(not pcall(debug.getinfo, print, "X")) -- invalid option + assert(not pcall(debug.getinfo, 0, ">")) -- invalid option assert(not debug.getinfo(1000)) -- out of range level assert(not debug.getinfo(-1)) -- out of range level local a = debug.getinfo(print) --- a/strings.lua +++ b/strings.lua @@ -361,6 +361,9 @@ assert(load("return 1\n--comment without ending EOL")() == 1) checkerror("table expected", table.concat, 3) +checkerror("at index " .. maxi, table.concat, {}, " ", maxi, maxi) +-- '%' escapes following minus signal +checkerror("at index %" .. mini, table.concat, {}, " ", mini, mini) assert(table.concat{} == "") assert(table.concat({}, 'x') == "") assert(table.concat({'\0', '\0\1', '\0\1\2'}, '.\0.') == "\0.\0.\0\1.\0.\0\1\2") --- a/errors.lua +++ b/errors.lua @@ -191,6 +191,13 @@ checkmessage("a = 24 // 0", "divide by zero") checkmessage("a = 1 % 0", "'n%0'") +-- type error for an object which is neither in an upvalue nor a register. +-- The following code will try to index the value 10 that is stored in +-- the metatable, without moving it to a register. +checkmessage("local a = setmetatable({}, {__index = 10}).x", + "attempt to index a number value") + + -- numeric for loops checkmessage("for i = {}, 10 do end", "table") checkmessage("for i = io.stdin, 10 do end", "FILE") ++++++ upstream-bugs.patch ++++++ --- a/src/ldblib.c +++ b/src/ldblib.c @@ -152,6 +152,7 @@ static int db_getinfo (lua_State *L) { lua_State *L1 = getthread(L, &arg); const char *options = luaL_optstring(L, arg+2, "flnSrtu"); checkstack(L, L1, 3); + luaL_argcheck(L, options[0] != '>', arg + 2, "invalid option '>'"); if (lua_isfunction(L, arg + 1)) { /* info about a function? */ options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */ lua_pushvalue(L, arg + 1); /* move function to 'L1' stack */ --- a/src/ltablib.c +++ b/src/ltablib.c @@ -146,7 +146,7 @@ static int tmove (lua_State *L) { static void addfield (lua_State *L, luaL_Buffer *b, lua_Integer i) { lua_geti(L, 1, i); if (!lua_isstring(L, -1)) - luaL_error(L, "invalid value (%s) at index %d in table for 'concat'", + luaL_error(L, "invalid value (%s) at index %I in table for 'concat'", luaL_typename(L, -1), i); luaL_addvalue(b); } --- a/src/ldebug.c +++ b/src/ldebug.c @@ -638,14 +638,18 @@ static const char *funcnamefromcode (lua_State *L, CallInfo *ci, /* -** The subtraction of two potentially unrelated pointers is -** not ISO C, but it should not crash a program; the subsequent -** checks are ISO C and ensure a correct result. +** Check whether pointer 'o' points to some value in the stack +** frame of the current function. Because 'o' may not point to a +** value in this stack, we cannot compare it with the region +** boundaries (undefined behaviour in ISO C). */ static int isinstack (CallInfo *ci, const TValue *o) { - StkId base = ci->func + 1; - ptrdiff_t i = cast(StkId, o) - base; - return (0 <= i && i < (ci->top - base) && s2v(base + i) == o); + StkId pos; + for (pos = ci->func + 1; pos < ci->top; pos++) { + if (o == s2v(pos)) + return 1; + } + return 0; /* not found */ }
