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

From: Andrea Corallo <[email-masked]>
Date: Wed, 21 Sep 2022 19:18:55 +0000

Lars Ingebrigtsen <[email-masked]> writes:

> Lars Tveito <[email-masked]> writes:
>
>> Evaluating the two following forms results in Emacs hanging:
>>
>> (defun test-cycle ()
>>   '#1=(a . #1#))
>>
>> (native-compile 'test-cycle)
>
> It seems to be inflooping in comp-ssa-rename.  A debug-on-quit backtrace
> included below.
>
> I've added Andrea to the CCs; perhaps he has some comments.

I see nor cl-nsubst-if nor cl-subst-if are robust against cyclic lists.
Is this a bug in cl-lib or is it expected?  In case I'll add an ad-hoc
substitute for this use (if there's no other alternative).

  Andrea