Opened 4 months ago

Closed 4 months ago

#14839 closed enhancement (fixed)


Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: normal Milestone: 10.2
Component: BOOK Version: SVN
Severity: normal Keywords:


New point version

Change History (3)

comment:1 by Douglas R. Reno, 4 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:2 by Douglas R. Reno, 4 months ago

The known bugs for lua-5.4.2 that were fixed in lua-5.4.3

'table.sort' does not work for partial orders.
reported by Egor Skriptunof on 04 Jan 2021. existed since 5.3.


nan = 0/0
t = {nan, nan, 20, 10}
print(table.concat(t, ", "))
  --> -nan, 20, -nan, 10

Patch: The manual is deceptive. It is necessary but not sufficient for the sort function to define a partial order.
Parameter 'what' of 'debug.getinfo' cannot start with '>'.
reported by Xmilia Hermit on 01 Feb 2021. existed since 5.1.


-- with Lua compiled with option LUA_USE_APICHECK
debug.getinfo(0, ">")


@@ -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 */

Error message in 'string.concat' uses wrong format.
reported by no-n and Andrew Gierth on 14 Feb 2021. existed since 5.3.0.


-- the following call gives an error message with a wrong index
table.concat({}, "", math.maxinteger, math.maxinteger)


@@ -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);

'isinstack' wrongly assumes we can work around an undefined behavior.
reported by Yongheng Chen on 21 Feb 2021. existed since 5.3.0.

Example: This bug probably will not cause a failure in flat-memory architectures. We can force it by compiling Lua with the gcc option '-fsanitize=pointer-subtract' (plus what it needs to work) and running the following code:

print(setmetatable({}, {__index = 4}).x) contains a full diff contains bug fixes is the Lua work area, where more information can be found

This should be a smooth update.

comment:3 by Douglas R. Reno, 4 months ago

Resolution: fixed
Status: assignedclosed

Fixed at r24418

Note: See TracTickets for help on using tickets.