emacs-devel
[Top][All Lists]
Advanced

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

Re: Not protecting Lisp objects from GC


From: Eli Zaretskii
Subject: Re: Not protecting Lisp objects from GC
Date: Mon, 27 Jan 2025 16:00:41 +0200

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 27 Jan 2025 14:26:42 +0100
> 
> The comment you added mentions a case where DEFVAR_LISP_NOPRO is used in
> exactly the way I described. That needs to be fixed!

AFAIU, we've fixed that already on the igc branch, in the MPS build,
in the sense that this macro was effectively removed in favor of
DEFVAR_LISP.  So when the igc branch lands, we will have that solved
on master, when building with MPS (which I hope will be what most of
the supported platforms will use).

In the non-MPS build, the changes which were proposed to remove its
use messed with special-purpose code in a way that I felt uneasy with,
so I preferred to leave the existing code alone.  I have my share of
gray hair from making changes in font.c and fontset.c.  If someone
suggests a simpler, cleaner change, I might reconsider.

> Just adding a comment is accepting it, and is worse than as writing
> such code in the first place.

Sorry, I fail to understand how describing some existing code could be
bad.  "Security by obscurity" doesn't really work, as we all know, and
maintainers have to deal with code that they don't like every day, so
helping them understand tricky corners cannot be bad, IMO.

> The old GC won't go away for many years.

Maybe not, but then the code in question worked for us for decades, so
a probability of a serious error there is quite low, to say the least.



reply via email to

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