From: Eli Zaretskii <eliz@gnu.org>
To: Andrea Corallo <akrl@sdf.org>
Cc: 41357@debbugs.gnu.org, eggert@cs.ucla.edu
Subject: bug#41357: 28.0.50; GC may miss to mark calle safe register content
Date: Sun, 17 May 2020 20:57:28 +0300 [thread overview]
Message-ID: <835zcubg1j.fsf@gnu.org> (raw)
In-Reply-To: <xjf4ksea213.fsf@sdf.org> (message from Andrea Corallo on Sun, 17 May 2020 17:45:28 +0000)
> From: Andrea Corallo <akrl@sdf.org>
> Cc: bug-gnu-emacs@gnu.org, eggert@cs.ucla.edu
> Date: Sun, 17 May 2020 17:45:28 +0000
>
> Lisp_Object
> foo (void)
> {
> /* 'res' goes in a callee saved reg */
> Lisp_Object res = build_string ("bar");
> [...]
> /* LTO inline the following as "flush_stack_call_func (mark_threads_callback, NULL);" */
> mark_threads ();
> [...]
> gc_sweep ();
>
> /* The string pointed by 'res' was garbage collected. */
> return res;
> }
But mark_threads etc. (GC in general) isn't called from functions like
your 'foo. It is more like this:
Lisp_Object
foo (void)
{
/* 'res' goes in a callee saved reg */
Lisp_Object res = build_string ("bar");
[...]
call_something ();
[...]
}
call_something (void)
{
[...]
garbage_collect ();
[...]
}
Which is quite different, AFAIU, wrt stack usage.
Or maybe I don't understand how "callee saved registers" work.
next prev parent reply other threads:[~2020-05-17 17:57 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835zcubg1j.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=41357@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=eggert@cs.ucla.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).