]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash on Windows 9X
authorPo Lu <luangruo@yahoo.com>
Tue, 6 Dec 2022 01:30:00 +0000 (09:30 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 6 Dec 2022 01:31:24 +0000 (09:31 +0800)
* src/emacs.c (main): Call init_bignum before init_window_once.

src/emacs.c

index 00e7f86e9ae29af55bef69d882ba8c398ceff084..d8a2863fd9c4fa4671f55bae59d573e0dfe358f0 100644 (file)
@@ -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.  */