lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Dec 19, 2018 at 10:05 PM Andrew Gierth wrote:
 Roberto> Lua has been using this system for many years, and it has been
 Roberto> doing quite well in embedded environments.

I wonder how many of them crash if you do

local function f(s) s:gsub(".", f) return "x" end f("foo")

and more to the point, how many of them will crash on that code if they
switch to 5.4 without realizing the default stack depth grew 10x.

 
Instead of testing it in embedded environments, I've tested this one-line Lua program on usual desktop computer.
Here are the results.
 
On Linux
Lua built with gcc (32-bit and 64-bit executables):
 
Catchable error is raised:
   Lua 5.1(all)
   Lua 5.2(all)
   Lua 5.3(all)
   Lua 5.4_work2(32-bit)
 
Host application crashes:
   Lua 5.4_work2(64-bit)
 
 
 
On Windows
Lua built with different compilers:
VisualStudio2010 and MinGW (from MSYS2), both produce 32-bit and 64-bit executables:
 
Catchable error is raised:
   Lua 5.1(all)
   Lua 5.2(all)
   Lua 5.3(VS 32-bit, MinGW 32-bit, MinGW 64-bit)
 
Host application crashes:
   Lua 5.3(VS 64-bit)
   Lua 5.4_work2(all)