Subject: Re: bug#57957: 29.0.50; Native compilation hangs on cyclic lists

From: Gerd Möllmann <[email-masked]>
Date: Thu, 22 Sep 2022 18:41:04 +0200

Andrea Corallo <[email-masked]> writes:

>>>>>From Common Lisp I can say that these functions expect a "tree",
>> i.e. not a circular list.
>
> Okay I tried an adhoc substitute but this is not the only place in the
> compiler not robust against cyclic lists, so more work will be needed.

The question is of course also how much effort circular lists deserve in
the compiler.  From my point of view, not too much because they aren't
very useful, in code at least.  And dealing with them costs runtime.

Maybe some places could use cl-list-length?  That function deals with
circular lists and returns nil then.  We could then refuse to compile.