Subject: Re: 28.0.50; GC may miss to mark calle safe register content

From: Eli Zaretskii <[email-masked]>
Date: Sun, 17 May 2020 18:36:45 +0300

> From: Andrea Corallo <[email-masked]>
> Cc: Paul Eggert <[email-masked]>, Eli Zaretskii <[email-masked]>
> Date: Sun, 17 May 2020 12:42:48 +0000
> 
> What is going on is that in a .eln in a function A a Lisp_Object is
> hold in a register (r14).  Function A is calling other functions into
> emacs-core till Garbage Collection is triggered.
> 
> Being emacs-core compiled with -O0 GCC is not selecting any callee safe
> register and therefore these gets never pushed.

Isn't this something for the infrastructure of calling
natively-compiled Lisp to solve?  The Emacs C code isn't prepared for
calling optimized C code when it calls Lisp, and I don't think it's
right for us to assume that, because it will make Emacs slower.  If
the natively-compiled Lisp needs some setup to be compatible with GC,
I think the calling framework should set that up.