emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with new Windows 98 crash


From: Eli Zaretskii
Subject: Re: Help with new Windows 98 crash
Date: Tue, 06 Dec 2022 14:12:54 +0200

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]