From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Outdated comment in eval.c?
Date: Tue, 21 Sep 2021 09:18:27 +0300 [thread overview]
Message-ID: <83zgs6zc24.fsf@gnu.org> (raw)
In-Reply-To: <87h7ee3b7d.fsf@yahoo.com> (message from Po Lu on Tue, 21 Sep 2021 10:37:58 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Date: Tue, 21 Sep 2021 10:37:58 +0800
>
> At line 367 of eval.c, I see the following comment:
>
> /* NOTE!!! Every function that can call EVAL must protect its args
> and temporaries from garbage collection while it needs them.
> The definition of `For' shows what you have to do. */
>
> But GCPRO has been gone for a long time, as Emacs now exclusively use
> conservative stack marking.
>
> Would it be prudent to remove this comment?
The issue is still valid, although it's now more subtle, and 'For' is
no longer a useful reference. GC can relocate buffers text and string
data, so the issue nowadays is to be careful with C 'char *' pointers
to buffer text and string data, and recompute them after every call to
a function that might trigger a GC.
I will see how to reword the comment, and will probably move it to
another place, where it is more pertinent.
next prev parent reply other threads:[~2021-09-21 6:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87h7ee3b7d.fsf.ref@yahoo.com>
2021-09-21 2:37 ` Outdated comment in eval.c? Po Lu
2021-09-21 6:18 ` Eli Zaretskii [this message]
2021-09-22 7:09 ` Eli Zaretskii
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=83zgs6zc24.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/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.