emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2c8b09b06e7: Fix crash on Windows 9X


From: Po Lu
Subject: Re: master 2c8b09b06e7: Fix crash on Windows 9X
Date: Wed, 07 Dec 2022 08:58:06 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
>> Date: Tue, 06 Dec 2022 20:51:58 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> No.  The call I added is only called before dumping, while the second is
>> >> called after dumping, AFAIK.
>> >
>> > No, the second one is done both before and after dumping.  Only the first
>> > call is conditioned.
>> 
>> Ah, thanks for the clarification.  In any case, it must come before
>> init_window_once.
>
> init_window_once is called only if (!initialized), so this order is only
> relevant for when dumping.
>
>> Does calling it twice hurt?
>
> It might, so I'd prefer not to risk such duplicate calls.  It should be easy
> to make sure it is called only once when dumping for unexec, and only once
> in the pdumper build (both when dumping and when not dumping).

Something like this?

diff --git a/src/emacs.c b/src/emacs.c
index d8a2863fd9c..f0d20f8eb8c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1937,7 +1937,10 @@ main (int argc, char **argv)
     }
 
   init_alloc ();
-  init_bignum ();
+#ifndef HAVE_UNEXEC
+  if (!initialized)
+    init_bignum ();
+#endif
   init_threads ();
   init_eval ();
   running_asynch_code = 0;


reply via email to

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