GNU bug report logs -
#75322
SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string)
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 75322 <at> debbugs.gnu.org
>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Date: Sun, 05 Jan 2025 07:59:32 +0100
>>
>> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>>
>> > Just want to add that all SAFE_NALLOC uses should be checked in
>> > scratch/igc. For example, set_overlays_multibyte uses it to store
>> > itree_node *, and itree_node is in MPS.
>> >
>> > I think I'll just make it allocate a root in my Emacs. That's the least
>> > work.
>>
>> Please find attached what I'm using now in my Emacs, in addition to your
>> xstrdup commit.
>
> These two are alternatives, right? IOW, we should use one or the
> other in each specific case, is that correct?
If you mean the two patches I sent with "these two", then no. I prefer
using SAFE_ALLOCA_LISP because that introduces an exact root.
If "these two" means xstrdup and my SAFE_NALLOCA change, then yes, kind
of. It doesn't harm to do both, but it's not strictly necessary to do
xstrdup if the SAFE_NALLOCA change is in. The other way round is not
true, i.e. having the xstrdup change fixes only 1 case.
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.