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


View this message in rfc822 format

From: Pip Cet <pipcet <at> protonmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: 75322 <at> debbugs.gnu.org
Subject: bug#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string)
Date: Fri, 03 Jan 2025 20:48:08 +0000
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
>
>>
>> The pointers to string data case probably requires adding yet another
>> macro SAFE_ALLOCA_FIND_A_GOOD_NAME, which, for MPS, allocates a root,
>> possibly and exact one which would be good.

Note that might still EFAULT if there's a memory barrier.  I think.

Do we really need to move all arguments to syscalls and libc functions
which might use a syscall into non-MPS memory?  That would be bad.

And which libc functions might use a syscall?  I think we can agree
fprintf might, and memcpy() doesn't (note to self: destroy all evidence
I ever considered making memcpy() use MMU tricks for very large
buffers), but what about all the others?

Maybe I'm panicking too much and fixing read/write/exec* is good enough?

> Or one does it as you did in b0a209e9204, that's of course also safe.
> For both old and new GC. (Don't remember if you mentioned it Pip, but
> old GC moves string data as well, during string compaction, should GC
> run).

Ouch.  Yes, I remember now.

Pip





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.