[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Better __index lookup loop detection
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 22 Jul 2022 09:54:40 -0300
> Currently loops in the __index lookup are detected by restricting the
> lookup to a depth of 2000.
> This can be removed by detecting loops instead of using a depth.
> Using two iterators traversing the __index lookup chain. Therby one is
> faster (in this case twice) as the other.
> In case there is a loop the faster one will at some point catch up to the
> slower one. If this happens a loop was detected and an error can be raised.
Would you mind explaining this idea more clearly?
-- Roberto