On Mon, 16 Oct 2006 at 9:40pm, Bram Moolenaar wrote:

>
> Hari Krishna Dara wrote:
>
> > On Sun, 15 Oct 2006 at 3:10pm, Bram Moolenaar wrote:
> >
> > >
> > > Patch 7.0.134
> > > Problem:    Crash when comparing a recursively looped List or Dictionary.
> > > Solution:   Limit recursiveness for comparing to 1000.
> > > Files:        src/eval.c
> >
> > Does this handle the cases when the exact same objects are involved in
> > the references? All such cases will result in inf. recursion, as there
> > is no logic to break the references, like it is possible in case of
> > functions. If not, is it going to be in another patch?
>
> Yes, I have another patch in the pipeline to have comparing a list or
> dictionary with itself return TRUE quickly.
>
> Also, I was thinking of returning TRUE instead of FALSE when running
> into the recursiveness limit.  If everything compares equal so far, then
> it's probably equal.
>
> There should be an error message, but I'm afraid you might get thousands
> of them...

The need to compare lists or dictionaries with suge depths is very very
rare, unless the user logic has a bug that creates such structures or
Vim logic itself fails to detect recursions, in which case giving out an
error message is helpful.

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to