unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Andy Gaynor <goldipox@mail.com>,
	54501@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#54501: Segfault on recursive structure
Date: Tue, 22 Mar 2022 16:02:57 +0100	[thread overview]
Message-ID: <87y212do7y.fsf@igel.home> (raw)
In-Reply-To: <87cziekpwk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 22 Mar 2022 15:44:43 +0100")

On Mär 22 2022, Lars Ingebrigtsen wrote:

> 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?

That's an side effect of the implementation: (nil) is the placeholder
object which #0# then references.

> 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?

Does it crash in substitute_object_recurse?

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





  reply	other threads:[~2022-03-22 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 14:26 bug#54501: 27.2; to be disclosed in private Andy Gaynor
2022-03-22 14:44 ` bug#54501: Segfault on recursive structure Lars Ingebrigtsen
2022-03-22 15:02   ` Andreas Schwab [this message]
2022-03-22 15:04     ` Lars Ingebrigtsen
     [not found]       ` <trinity-1bb5c502-bafe-4a6c-b6be-08a2a1b27232-1648049044877@3c-app-mailcom-lxa04>
2022-03-25 15:34         ` Lars Ingebrigtsen
2022-03-26 15:58 ` Mattias Engdegård
2022-03-26 16:33   ` Lars Ingebrigtsen
     [not found]     ` <8F7060F3-8137-4835-873F-68E3F6B8010D@acm.org>
2022-03-26 17:43       ` Mattias Engdegård
2022-03-26 18:00     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y212do7y.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=54501@debbugs.gnu.org \
    --cc=goldipox@mail.com \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).