From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 2c8b09b06e7: Fix crash on Windows 9X Date: Tue, 06 Dec 2022 14:21:15 +0200 Message-ID: <83r0xc7mf8.fsf@gnu.org> References: <167029029523.21453.12133435240921985505@vcs2.savannah.gnu.org> <20221206013135.E2E2DC004BE@vcs2.savannah.gnu.org> <87fsdtnn8x.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16837"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 06 13:26:12 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2X1X-00049q-LQ for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Dec 2022 13:26:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2Wx1-0003qd-0z; Tue, 06 Dec 2022 07:21:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2Wwz-0003q7-UM for emacs-devel@gnu.org; Tue, 06 Dec 2022 07:21:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2Wwz-00071j-9G; Tue, 06 Dec 2022 07:21:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=t83QUBe6ER47z4U2unVkVrUU7DEGN16hUW6iLSS+poc=; b=EL866RkEzMfX TW3RBWjnTakUUZqVYY1VsNZn8GMCdbDfU2iOceVgd/+d4AxrpWSyMg7SdteMLW5W5EnJg5wvGs0Vn m1sFLTU10mwX6S+qwGjMHqhIWpDObo6AUtf6gxVYlbaKqlCLQTYjn5JXukIa3USIlgo/Mg0veYSOs GsmPBohitki/hRUUQ5xAEL/UFMG8wrCKbMw9bPRBkrAbgsLn0dClB5S8fLCxeKS9zwbrdOhoaEVSh kBzQHQW6Sfxp2feFVLBV37x0vcYqMA9PU9LFSm5KQzzUaf9BmrgHr/KaZ7/Sr1ns/C2L+4frEUU6n L+0Wa6USuIRer6qgDDyUMA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2Wwy-0005i0-FM; Tue, 06 Dec 2022 07:21:28 -0500 In-Reply-To: <87fsdtnn8x.fsf@yahoo.com> (message from Po Lu on Tue, 06 Dec 2022 12:56:46 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300958 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Tue, 06 Dec 2022 12:56:46 +0800 > > Stefan Monnier writes: > > >> --- 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. */ > > > > I feel like I'm missing something: this adds a call to `init_bignum` > > whereas I expected the patch to *move* the call. > > Was this call simply missing? > > > > > > Stefan > > 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.