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 #131 received at 75322 <at> debbugs.gnu.org (full text, mbox):

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

> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>
>> 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
>
> For argv, I agree, but make_environment_block uses xnmalloc and assumes
> SDATA pointers in there will survive, which they don't, according to my
> GDB log.

Ah, okay. Then both xstrdup and SAFE_NALLOCA. Which I have here
so I'm good.

> It was very brave not to start out by making every xmalloc an ambiguous
> root and fixing only those that we know to be safe :-)

The SAFE_ stuff was only 1 out of 6542 things to get going. And I'm
absolutely reckless anyway :-).




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.