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-08-02 12:04:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and      /work/SRC/openSUSE:Factory/.lua54.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lua54"

Mon Aug  2 12:04:16 2021 rev:12 rq:909226 version:5.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/lua54/lua54.changes      2021-06-01 
10:34:07.988473023 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1899/lua54.changes    2021-08-02 
12:04:23.145664763 +0200
@@ -1,0 +2,6 @@
+Thu Jul 29 16:31:23 UTC 2021 - Callum Farmer <[email protected]>
+
+- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 4,5,6 for build and tests respectively.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lua54.spec ++++++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.181664543 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.185664542 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lua54
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed

++++++ upstream-bugs-test.patch ++++++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.233664531 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.237664531 +0200
@@ -102,3 +102,73 @@
  do
    -- yielding inside closing metamethods after an error
  
+diff --git a/testes/locals.lua b/testes/locals.lua
+index 6151f64d0..62a88df57 100644
+--- a/locals.lua
++++ b/locals.lua
+@@ -187,6 +187,8 @@ do   -- constants
+   checkro("y", "local x, y <const>, z = 10, 20, 30; x = 11; y = 12")
+   checkro("x", "local x <const>, y, z <const> = 10, 20, 30; x = 11")
+   checkro("z", "local x <const>, y, z <const> = 10, 20, 30; y = 10; z = 11")
++  checkro("foo", "local foo <const> = 10; function foo() end")
++  checkro("foo", "local foo <const> = {}; function foo() end")
+ 
+   checkro("z", [[
+     local a, z <const>, b = 10;
+diff --git a/testes/bitwise.lua b/testes/bitwise.lua
+index 59781f5df..9509f7f04 100644
+--- a/bitwise.lua
++++ b/bitwise.lua
+@@ -45,6 +45,11 @@ assert(-1 >> numbits == 0 and
+        -1 << numbits == 0 and
+        -1 << -numbits == 0)
+ 
++assert(1 >> math.mininteger == 0)
++assert(1 >> math.maxinteger == 0)
++assert(1 << math.mininteger == 0)
++assert(1 << math.maxinteger == 0)
++
+ assert((2^30 - 1) << 2^30 == 0)
+ assert((2^30 - 1) >> 2^30 == 0)
+ 
+diff --git a/testes/errors.lua b/testes/errors.lua
+index 825f37c29..a7dc479a2 100644
+--- a/errors.lua
++++ b/errors.lua
+@@ -228,6 +228,22 @@ do   -- named objects (field '__name')
+   checkmessage("return {} < XX", "table with My Type")
+   checkmessage("return XX < io.stdin", "My Type with FILE*")
+   _G.XX = nil
++
++  if T then   -- extra tests for 'luaL_tolstring'
++    -- bug in 5.4.3; 'luaL_tolstring' with negative indices
++    local x = setmetatable({}, {__name="TABLE"})
++    assert(T.testC("Ltolstring -1; return 1", x) == tostring(x))
++
++    local a, b = T.testC("pushint 10; Ltolstring -2; return 2", x)
++    assert(a == 10 and b == tostring(x))
++
++    setmetatable(x, {__tostring=function (o)
++      assert(o == x)
++      return "ABC"
++    end})
++    a, b, c = T.testC("pushint 10; Ltolstring -2; return 3", x)
++    assert(a == x and b == 10 and c == "ABC")
++  end
+ end
+ 
+ -- global functions
+diff --git a/ltests.c b/ltests.c
+index a50f78304..97834e380 100644
+--- a/ltests/ltests.c
++++ b/ltests/ltests.c
+@@ -1743,6 +1743,9 @@ static struct X { int x; } x;
+       (void)s1;  /* to avoid warnings */
+       lua_longassert((s == NULL && s1 == NULL) || strcmp(s, s1) == 0);
+     }
++    else if EQ("Ltolstring") {
++      luaL_tolstring(L1, getindex, NULL);
++    }
+     else if EQ("type") {
+       lua_pushstring(L1, luaL_typename(L1, getnum));
+     }

++++++ upstream-bugs.patch ++++++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.241664530 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.245664529 +0200
@@ -147,3 +147,74 @@
            if (L->top < ci->top)
              L->top = ci->top;
            luaF_close(L, base, CLOSEKTOP, 1);
+From 6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <[email protected]>
+Date: Sun, 20 Jun 2021 15:36:36 -0300
+Subject: [PATCH] Bug: 'local function' can assign to '<const>' variables
+
+---
+ lparser.c         | 1 +
+ testes/locals.lua | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/lparser.c b/lparser.c
+index df9473c27..3abe3d751 100644
+--- a/src/lparser.c
++++ b/src/lparser.c
+@@ -1785,6 +1785,7 @@ static void funcstat (LexState *ls, int line) {
+   luaX_next(ls);  /* skip FUNCTION */
+   ismethod = funcname(ls, &v);
+   body(ls, &b, ismethod, line);
++  check_readonly(ls, &v);
+   luaK_storevar(ls->fs, &v, &b);
+   luaK_fixline(ls->fs, line);  /* definition "happens" in the first line */
+ }
+From 62fb93442753cbfb828335cd172e71471dffd536 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <[email protected]>
+Date: Thu, 22 Jul 2021 13:44:53 -0300
+Subject: [PATCH] Bug: Negation in 'luaV_shiftr' may overflow
+
+Negation of an unchecked lua_Integer overflows with mininteger.
+---
+ lvm.c              | 2 +-
+ testes/bitwise.lua | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lvm.c b/lvm.c
+index ec83f4159..c84a665f5 100644
+--- a/src/lvm.c
++++ b/src/lvm.c
+@@ -766,7 +766,7 @@ lua_Number luaV_modf (lua_State *L, lua_Number m, 
lua_Number n) {
+ /*
+ ** Shift left operation. (Shift right just negates 'y'.)
+ */
+-#define luaV_shiftr(x,y)      luaV_shiftl(x,-(y))
++#define luaV_shiftr(x,y)      luaV_shiftl(x,intop(-, 0, y))
+ 
+ lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {
+   if (y < 0) {  /* shift right? */
+From 439e45a2f69549b674d6a6e2023e8debfa00a2b8 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <[email protected]>
+Date: Thu, 22 Jul 2021 13:48:43 -0300
+Subject: [PATCH] Bug: luaL_tolstring may get confused with negative index
+
+When object has a '__name' metafield, 'luaL_tolstring' used the
+received index after pushing a string on the stack.
+---
+ lauxlib.c         |  1 +
+ ltests.c          |  3 +++
+ testes/errors.lua | 16 ++++++++++++++++
+ 3 files changed, 20 insertions(+)
+
+diff --git a/lauxlib.c b/lauxlib.c
+index 94835ef93..8ed1da112 100644
+--- a/src/lauxlib.c
++++ b/src/lauxlib.c
+@@ -881,6 +881,7 @@ LUALIB_API lua_Integer luaL_len (lua_State *L, int idx) {
+ 
+ 
+ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
++  idx = lua_absindex(L,idx);
+   if (luaL_callmeta(L, idx, "__tostring")) {  /* metafield? */
+     if (!lua_isstring(L, -1))
+       luaL_error(L, "'__tostring' must return a string");

Reply via email to