From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Help with new Windows 98 crash
Date: Tue, 06 Dec 2022 14:12:54 +0200 [thread overview]
Message-ID: <83wn747mt5.fsf@gnu.org> (raw)
In-Reply-To: <87k035nwv3.fsf@yahoo.com> (message from Po Lu on Tue, 06 Dec 2022 09:29:04 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 06 Dec 2022 09:29:04 +0800
>
> init_bignum must be called before make_initial_frame, because that
> allocates a bignum in temacs (as set_window_buffer calls
> bset_display_time and Fcurrent_time, which go through the time
> arithmetic stuff), before our own allocator has been set up, which ends
> up in the dumped Emacs, leading to a free of a pointer from the wrong
> heap once the bignum is garbage collected.
>
> I have installed the change on the Emacs 30 branch because I am not sure
> it is safe for Emacs 29. Can you think of a safer fix?
There's nothing unsafe in what you did, but:
. the call to init_bignum inside the !initialized block should be
conditioned on HAVE_UNEXEC
. the call to init_bignum that is a few lines below that, and outside of
the !initialized condition should be conditioned using HAVE_UNEXEC and
initialized such that we don't invoke this function twice in any case,
whether this is during dumping or not and whether this is a pdumper
build or not
If you do these two changes, we can have the result on the release branch.
Please show the patch before installing.
Thanks.
next prev parent reply other threads:[~2022-12-06 12:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87o7sindcl.fsf.ref@yahoo.com>
2022-12-05 14:18 ` Help with new Windows 98 crash Po Lu
2022-12-05 14:52 ` Eli Zaretskii
2022-12-05 16:59 ` Eli Zaretskii
2022-12-06 1:29 ` Po Lu
2022-12-06 12:12 ` Eli Zaretskii [this message]
2022-12-06 12:53 ` Po Lu
2022-12-06 14:32 ` Eli Zaretskii
2022-12-07 0:59 ` Po Lu
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=83wn747mt5.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 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).