Re: Script terminated unexpectedly
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Script terminated unexpectedly
- From: Shmuel Zeigerman <shmuz@...>
- Date: 2008年9月25日 10:42:57 +0300
Shmuel Zeigerman wrote:
-- Windows XP SP2, Lua 5.1.4
local N = 1e5
local patt = "^\n?[^\n]*" .. ("\n[^\n]*"):rep(N-1)
local subj = (("a"):rep(19).."\n"):rep(40000)
subj:match(patt) --> terminated here; no error message
print("OK") --> not printed
It seems, the reason for failure was stack overflow.
I've rebuilt lua.exe, adding a new file lua.def to the link command.
lua.def contained just 1 line:
STACKSIZE 5000000
The rebuilt lua.exe executes the above test case OK. So, this is not a
Lua bug.
--
Shmuel