lua-users home
lua-l archive

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

>>> The following function, when invoked, causes a C stack overflow
>>> in Lua 5.3.
>>> local subsystem_mt = {__index =
>>>     function(spec,auction)
>>>        for key,bid in ipairs(spec) do
>>>           print("Checking '""' against '"..key.."'")
>>>        end
>>>     end}

On Thu, Sep 3, 2015 at 11:01 AM, Soni L. <> wrote:
> But I don't see how invoking it would cause something, either.

Eventually, ipairs will get to the end of the spec.  At which point,
ipairs will cause a recursive call to __index, which calls ipairs
again, etc.