all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 53348@debbugs.gnu.org, "Reingruber,
	Richard" <richard.reingruber@sap.com>
Subject: bug#53348: 27.2; Crash in mark_object
Date: Fri, 21 Jan 2022 11:34:25 +0100	[thread overview]
Message-ID: <87h79xtm1a.fsf@gnus.org> (raw)
In-Reply-To: <83a6ftue6w.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Jan 2022 19:49:27 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> Yes, GC is very recursive, although it shouldn't cause stack overflow
> with "usual" data structure.  No, a long list shouldn't cause such
> deep recursion, but a deeply-recursive list or some other recursive
> data structure could, if the depth is unusually large.

In particular, the gc is recursive on the `car' of cons cells.  The
following trivial code should segfault Emacs (so don't evaluate it):

(let ((foo (cons 1 1)))
  (dotimes (i 1000000)
    (setcar foo (cons 1 1))
    (setq foo (car foo))))
(garbage-collect)

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





  reply	other threads:[~2022-01-21 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18  8:35 bug#53348: 27.2; Crash in mark_object Reingruber, Richard via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-18 16:53 ` Eli Zaretskii
2022-01-18 17:07   ` Reingruber, Richard via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-18 17:49     ` Eli Zaretskii
2022-01-21 10:34       ` Lars Ingebrigtsen [this message]
2022-01-21 10:36         ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87h79xtm1a.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=53348@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=richard.reingruber@sap.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.