GNU bug report logs -
#41357
28.0.50; GC may miss to mark calle safe register content
Previous Next
Reported by: Andrea Corallo <akrl <at> sdf.org>
Date: Sun, 17 May 2020 12:43:02 UTC
Severity: normal
Found in version 28.0.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #65 received at submit <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: akrl <at> sdf.org, bug-gnu-emacs <at> gnu.org
>> From: Paul Eggert <eggert <at> cs.ucla.edu>
>> Date: Sun, 17 May 2020 12:05:25 -0700
>>
>> On 5/17/20 10:24 AM, Eli Zaretskii wrote:
>> > I struggle to see
>> > how a Lisp object could appear in a register without leaving any trace
>> > on the stack
>>
>> Quite easily. It happens all the time. If I do something like this:
>>
>> Lisp_Object a = Fcons (b, c);
>> f (x, y);
>> return a;
>
> And where's GC in this picture?
GC can be triggered by f or any of his callee it does not matter.
> If it's called directly from 'f', can
> you show me such code in Emacs? Then we could disassembly it and see
> what we've got.
I'm not sure what we can prove disassembling, that would be just the
result of a specific .c + toolchain + invocation. I think we want to
have code that is sufficiently portable and safe because correct.
> Usually the code that calls GC is much deeper, and thus the chance of
> that temporary to stay in a register is very small, to say the least.
Probably yes, but I don't think we want to have code that works accidentally.
Andrea
--
akrl <at> sdf.org
This bug report was last modified 5 years and 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.