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.bugs Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation Date: Wed, 28 Jun 2023 14:37:27 +0300 Message-ID: <83r0pvvmvc.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63365@debbugs.gnu.org, arash@gnu.org, acorallo@gnu.org, svraka.andras@gmail.com To: Cyril Arnould Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 28 13:38:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qETVC-0009lS-Hl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Jun 2023 13:38:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qETUr-0004tn-2D; Wed, 28 Jun 2023 07:38:05 -0400 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 1qETUp-0004tY-3x for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 07:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qETUo-0006E4-Mv for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 07:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qETUo-00045J-0Z for bug-gnu-emacs@gnu.org; Wed, 28 Jun 2023 07:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Jun 2023 11:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63365 X-GNU-PR-Package: emacs Original-Received: via spool by 63365-submit@debbugs.gnu.org id=B63365.168795223615639 (code B ref 63365); Wed, 28 Jun 2023 11:38:01 +0000 Original-Received: (at 63365) by debbugs.gnu.org; 28 Jun 2023 11:37:16 +0000 Original-Received: from localhost ([127.0.0.1]:50128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qETU4-00044A-C1 for submit@debbugs.gnu.org; Wed, 28 Jun 2023 07:37:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qETU0-00043u-FT for 63365@debbugs.gnu.org; Wed, 28 Jun 2023 07:37:15 -0400 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 1qETTu-0005W6-Jz; Wed, 28 Jun 2023 07:37:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Z6n7HTbO/AaovjKqkt5KapGJAVD7jYB928qtu482zVw=; b=gPFAs12i6F3Mr1uUi1QE 5jZBJe+VfWurfLYqfFNjspXYu4N/J/Yemklp/W7oiFDHDF8NPoe+pdjYE4vr+5bzYPMZYHJb9QDI6 tca1HesUXfh2YrGxqfQv5GV/zpv2zWpwDAQQm183+lfeFq4ydb2qF54GI3x655c8DkhxhaHcwQNcR xo8ZJ8pNDEyPNdb2G9CcRDjOyDU5kAvrjWAqzoBqIBtsOl0HsxMtynNw2Tpbvfyl8HXtL3bTc/dLB mPhy76DISf8hRj3jBR0wTpKKzjfIBM3allZkYCumI/ejNfRnvJzDOCySnf4M04rg+xCkA82HGAr10 Zdx2LIxjq9N3cg==; 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 1qETTr-0004ZK-47; Wed, 28 Jun 2023 07:37:05 -0400 In-Reply-To: (message from Cyril Arnould on Tue, 27 Jun 2023 19:28:12 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264202 Archived-At: > From: Cyril Arnould > CC: "63365@debbugs.gnu.org" <63365@debbugs.gnu.org>, > András Svraka , Andrea Corallo > , Arash Esbati > Date: Tue, 27 Jun 2023 19:28:12 +0000 > > > $ cd src > > $ make lread.o -W lread.c CFLAGS='-O2 -fno-optimize-sibling-calls' > > $ make > > > > The last "make command will produce an emacs.exe binary where lread.c > > is compiled without the problematic optimization. > > I see, thanks. Is there a reason you left out the -g3 and -gdwarf-2 > switches? No particular reason. > To be sure, I've tried it with and without those, but I got > similar results so far: all of the combinations I've tried are > failing. I'm trying to widen the search to see if I can figure out which > file is the culprit. Since the problem disappears under GDB, it is probably memory-related. So it figures that it behaves like a classic heisenbug. Unfortunately, it means more combinations to try and more time to waste... > >From the tests I've run it seems to me that there is absolutely no > consistency with which lisp files cause the crashes. Each of the builds > resulted in different lisp files failing. Now, when I run the make > command again after a failed attempt, the *same* lisp files will keep > failing to build over and over. However, I also noticed that if I run > the exact same build commands again from a clean checkout, different > lisp files will fail the second time around. Is it normal that there are > run-to-run variations with GCC? See above: I'm not surprised. Especially since MinGW64 uses ASLR. However, using sequential builds, as suggested by Andrea, could perhaps help. I'd also consider building with -Wl,--disable-dynamicbase for example like this (when you run Make in the src directory): make LD_SWITCH_SYSTEM='-Wl,--disable-dynamicbase' Maybe this will make the bug less unpredictable, who knows?