From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 41357@debbugs.gnu.org, akrl@sdf.org
Subject: bug#41357: 28.0.50; GC may miss to mark calle safe register content
Date: Sun, 17 May 2020 12:05:25 -0700 [thread overview]
Message-ID: <ed7f81e2-faf0-e3ae-0042-0c4be32753fd@cs.ucla.edu> (raw)
In-Reply-To: <838shqbhko.fsf@gnu.org>
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;
The compiler might put 'a' into a callee-save register R, which means that while
f is running there's no trace of 'a' on the stack (unless f's code itself
decides to use R for whatever reason, but let's suppose it doesn't). This
situation can persist even if f calls g which calls h which calls the garbage
collector, and the garbage collector will then think the cons is garbage even
though it's not.
The proposed fix is harmless except it may execute a handful more instructions
per GC. So the cost of applying the fix is tiny, whereas the potential
reliability benefit is large.
next prev parent reply other threads:[~2020-05-17 19:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 12:42 bug#41357: 28.0.50; GC may miss to mark calle safe register content Andrea Corallo
2020-05-17 15:36 ` Eli Zaretskii
2020-05-17 16:40 ` Andrea Corallo
2020-05-17 16:46 ` Paul Eggert
2020-05-17 17:00 ` Pip Cet
2020-05-17 19:01 ` Paul Eggert
2020-05-17 19:19 ` Eli Zaretskii
2020-05-17 20:23 ` Andrea Corallo
2020-05-17 21:03 ` Paul Eggert
2020-05-17 17:04 ` Eli Zaretskii
2020-05-17 17:21 ` Andrea Corallo
2020-05-17 17:28 ` Eli Zaretskii
2020-05-17 21:27 ` Paul Eggert
2020-05-17 21:47 ` Andrea Corallo
2020-05-17 17:04 ` Eli Zaretskii
2020-05-17 17:08 ` Paul Eggert
2020-05-17 17:24 ` Eli Zaretskii
2020-05-17 19:05 ` Paul Eggert [this message]
2020-05-17 19:26 ` Eli Zaretskii
2020-05-17 19:46 ` Andrea Corallo
2020-05-17 21:21 ` Paul Eggert
2020-05-17 17:13 ` Andrea Corallo
2020-05-17 17:22 ` Eli Zaretskii
2020-05-17 17:45 ` Andrea Corallo
2020-05-17 17:57 ` Eli Zaretskii
2020-05-17 18:16 ` Andrea Corallo
2020-05-25 2:09 ` Tom Tromey
2020-05-25 8:37 ` Andrea Corallo
2020-05-28 22:08 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed7f81e2-faf0-e3ae-0042-0c4be32753fd@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=41357@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.