[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Interesting stack overflow in Lua 5.3
- From: Paul K <paul@...>
- Date: Thu, 03 Sep 2015 18:08:46 +0000
>> I may be missing something, but "The following function" does not seem
>> to be a function. It looks like a table... (Therefore, I do not know
>> how to invoke it to cause something.)
> But I don't see how invoking it would cause something, either.
Add: setmetatable({1,2,3}, subsystem_mt).foo()
Lua 5.2 prints:
Checking 'foo' against '1'
Checking 'foo' against '2'
Checking 'foo' against '3'
metaindex.lua:7: attempt to call field 'foo' (a nil value)
But Lua 5.3 prints:
Checking 'foo' against '1'
Checking 'foo' against '2'
Checking 'foo' against '3'
Checking '4' against '1'
Checking '4' against '2'
Checking '4' against '3'
...last three lines are repeated...
metaindex.lua:3: C stack overflow
Paul.