summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-12-06 09:30:00 +0800
committerPo Lu <luangruo@yahoo.com>2022-12-06 09:31:24 +0800
commit2c8b09b06e731943c9471a57d90d52363c7c192c (patch)
treed08b0b88db42e046031f8a96c29f0a8d2b19129a
parent3114158a384d4c1fdc3e1845bf8a55fca7787916 (diff)
downloademacs-2c8b09b06e731943c9471a57d90d52363c7c192c.tar.gz
emacs-2c8b09b06e731943c9471a57d90d52363c7c192c.tar.bz2
emacs-2c8b09b06e731943c9471a57d90d52363c7c192c.zip
Fix crash on Windows 9X
* src/emacs.c (main): Call init_bignum before init_window_once.
-rw-r--r--src/emacs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 00e7f86e9ae..d8a2863fd9c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1924,6 +1924,12 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
Vcoding_system_hash_table. */
syms_of_coding (); /* This should be after syms_of_fileio. */
init_frame_once (); /* Before init_window_once. */
+ /* init_window_once calls make_initial_frame, which calls
+ Fcurrent_time and bset_display_time, both of which allocate
+ bignums. Without the following call to init_bignums, crashes
+ happen on Windows 9X after dumping when GC tries to free a
+ pointer allocated on the system heap. */
+ init_bignum ();
init_window_once (); /* Init the window system. */
#ifdef HAVE_WINDOW_SYSTEM
init_fringe_once (); /* Swap bitmaps if necessary. */