bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53348: 27.2; Crash in mark_object


From: Lars Ingebrigtsen
Subject: bug#53348: 27.2; Crash in mark_object
Date: Fri, 21 Jan 2022 11:34:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]