GNU bug report logs - #53348
27.2; Crash in mark_object

Previous Next

Package: emacs;

Reported by: "Reingruber, Richard" <richard.reingruber <at> sap.com>

Date: Tue, 18 Jan 2022 16:04:02 UTC

Severity: normal

Found in version 27.2

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53348 <at> debbugs.gnu.org, "Reingruber, Richard" <richard.reingruber <at> sap.com>
Subject: bug#53348: 27.2; Crash in mark_object
Date: Fri, 21 Jan 2022 11:34:25 +0100
Eli Zaretskii <eliz <at> 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




This bug report was last modified 3 years and 153 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.