From: Lynn Winebarger <owinebar@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Objects that can't be purified during dumping
Date: Sun, 24 Jul 2022 08:16:14 -0400 [thread overview]
Message-ID: <CAM=F=bDGi6wShZqLYbsYXHhitqAqhNgzeFsvFNJojO3To3wYiQ@mail.gmail.com> (raw)
In-Reply-To: <jwv4jz76d14.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
On Sat, Jul 23, 2022, 11:55 AM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> > I recalled seeing an exchange to that effect on this list. I'll try the
> > hack (on alloc.c) and see if it works as an interim solution.
>
> I think you can just do:
>
> diff --git a/src/alloc.c b/src/alloc.c
> index 6e166d00d5b..acf558f3c7a 100644
> --- a/src/alloc.c
> +++ b/src/alloc.c
> @@ -5611,7 +5611,8 @@ DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
> static Lisp_Object
> purecopy (Lisp_Object obj)
> {
> - if (FIXNUMP (obj)
> + if (true
> + || FIXNUMP (obj)
> || (! SYMBOLP (obj) && PURE_P (XPNTR (obj)))
> || SUBRP (obj))
> return obj; /* Already pure. */
>
> But, the "pinned" approach as is done for hash-tables should work just
> fine as well.
>
I had an off-list response indicating the purify routine is only being
called because the ELISP source uses defconst instead of defvar when
defining the symbol. I just changed that statement to a defvar and the
problem went away. That's the most expedient solution at the moment, as
changing the c source would require re-native-compiling all the elisp files
I'm including in the dump, which takes hours to do sequentially.
I will keep this approach in my back pocket for now. Once I know the dump
will work, I may revisit the issue.
Thanks,
Lynn
[-- Attachment #2: Type: text/html, Size: 2161 bytes --]
next prev parent reply other threads:[~2022-07-24 12:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 12:19 Objects that can't be purified during dumping Lynn Winebarger
2022-07-23 13:27 ` Eli Zaretskii
2022-07-23 13:59 ` Lynn Winebarger
2022-07-23 15:27 ` Eli Zaretskii
2022-07-23 15:55 ` Stefan Monnier
2022-07-24 12:16 ` Lynn Winebarger [this message]
2022-07-24 15:07 ` Stefan Monnier
2022-07-24 15:08 ` Eli Zaretskii
2022-08-07 11:27 ` Lynn Winebarger
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='CAM=F=bDGi6wShZqLYbsYXHhitqAqhNgzeFsvFNJojO3To3wYiQ@mail.gmail.com' \
--to=owinebar@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).