lua-users home
lua-l archive

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


a = function (a)
	return a(a)
end

loadstring(
	"print(" .. ("a("):rep(10^6) .. "a" .. (")"):rep(10^6) .. ")"
)()

The above code snippet errors with Lua falsely claiming that an attempt
was made to call a nil value.  Replacing 10^6 with, for example, 10
would cause Lua to happily enter an infinite loop.

P.S.  If I wrote something stupid again, please let me know and I'll
never post to this mailing list again in order to avoid filling up users
inboxes with useless crap.  :)

Thank you.