GNU bug report logs - #75322
SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string)

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Fri, 3 Jan 2025 17:21:02 UTC

Severity: normal

Full log


Message #179 received at 75322 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pipcet <at> protonmail.com, 75322 <at> debbugs.gnu.org
Subject: Re: bug#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string)
Date: Sun, 05 Jan 2025 20:02:22 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Cc: pipcet <at> protonmail.com,  75322 <at> debbugs.gnu.org
>> Date: Sun, 05 Jan 2025 18:49:56 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > This surprises me because on the master branch SAFE_ALLOCA_LISP either
>> > calls alloca or xzalloc.  So I don't see why SAFE_ALLOCA_LISP would be
>> > safer in the old GC than SAFE_NALLOCA.  It's only on the igc branch
>> > that you made SAFE_ALLOCA_LISP make a Lisp vector.
>> > But this is a tangent from my POV.  I would like to discuss the new
>> > GC, not the old one.
>> >
>> 
>> This in SAFE_ALLOCA_LISP_EXTRA
>> 
>> 	(buf) = xzalloc (alloca_nbytes);		       \
>> 	record_unwind_protect_array (buf, nelt);	       \
>> 
>> makes a specpdl entry, which makes mark_specpdl do this:
>> 
>> 	case SPECPDL_UNWIND_ARRAY:
>> 	  mark_objects (pdl->unwind_array.array, pdl->unwind_array.nelts);
>> 	  break;
>
> Thanks.  I guess it's supposed to be "common knowledge" that
> record_unwind_protect_* indirectly causes the objects to be marked...
>
> But then why don't we set the .mark member in SAFE_NALLOCA or some
> variant thereof?

Questions upon questions. I have no idea. It seems to be relatively
new, i.e. younger than 20 years :-).




This bug report was last modified 147 days ago.

Previous Next


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