Subject: bug#54501: Segfault on recursive structure

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 22 Mar 2022 15:44:43 +0100

So this bug report is about two things.  The first is that this reads to
(nil):

#0=#0#

Which seems odd.  Reading #0=#1# signals an error, but it's not
immediately clear to me whether #0=#0# is totally nonsensical or not.
And if not, is (nil) the right result?  Anybody?

The other thing is more serious, and reading the following will segfault
your Emacs, so don't do that:

#0=[#1=(#0# . #1#)]

Now, Emacs segfaults on trying to gc a number of recursive objects
(especially ones that recurse in the `car'), but this seems to actually
segfault in the reader.  Is it obvious to anybody why?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no