[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A crash in Lua 5.3.2
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 5 Jan 2016 22:12:35 +0200
2016-01-05 19:18 GMT+02:00 Lorenzo Donati <lorenzodonatibz@tiscali.it>:
>
>
> On 01/01/2016 15:30, Roberto Ierusalimschy wrote:
>>>>
>>>> ```
>>>> local mt = {}
>>>> mt.__newindex = mt
>>>> local t = setmetatable({}, mt)
>>>> t[1] = 1
>> The bug is quite subtle. Follows a fix:
> Although it is subtle, it seems easy to trigger in Lua code.
Do you have an example that does not involve making
__newindex be the metatable itself?