emacs-devel
[Top][All Lists]
Advanced

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

MPS prstack


From: Helmut Eller
Subject: MPS prstack
Date: Mon, 20 May 2024 19:54:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

In print.c, there is a global variable prstack that is not yet scanned.
This causes a crash for comp-tests but this example triggers the same
problem:

(progn
  (defun make-tree (i)
    (cond ((= i 0) nil)
          (t (list (make-string 10000 i)
                   (make-tree (1- i)) (make-tree (1- i))))))
  (prin1-to-string (make-tree 13)))

We could create an ambiguous root for this but I thought it would be an
interesting exercise to scan it exactly.  It's interesting because this is
a static variable and the type is only declared in print.c.  So I added
a new function igc_xpalloc_exact to igc.h.  That uses a callback that
calls another callback.  I'm not sure if this allowed by the MPS rules
but it seems to work or at least doesn't seem to crash.

WDYT?

Attachment: 0001-Add-a-igc_xpalloc_exact-function.patch
Description: Text Data

Attachment: 0002-Allocate-prstack-as-exact-root.patch
Description: Text Data


reply via email to

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