|
>> local function f(s) s:gsub(".", f) return "x" end f("foo")
Egor> On *Linux*
Egor> Catchable error is raised:
Egor> Lua 5.1(all)
Egor> Lua 5.2(all)
Egor> Lua 5.3(all)
Egor> Lua 5.4_work2(32-bit)
Egor> Host application crashes:
Egor> Lua 5.4_work2(64-bit)
This suggests you're running with a stack size limit on the close order
of 16MB, perhaps?
Egor> On *Windows*
Egor> Catchable error is raised:
Egor> Lua 5.1(all)
Egor> Lua 5.2(all)
Egor> Lua 5.3(VS 32-bit, MinGW 32-bit, MinGW 64-bit)
Egor> Host application crashes:
Egor> Lua 5.3(VS 64-bit)
Egor> Lua 5.4_work2(all)
I am no windows expert, but I believe the stack size limit of a windows
binary can be specified at link time. So I guess MinGW is using a
different default size (presumably 2MB or more) there, and that VS's
default stack size is on the order of 1MB to 1.5MB; Lua 5.3 uses
something like 1.8MB for that code on a 64-bit build, and something
around 1MB on a 32-bit build.