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#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer' Date: Thu, 21 Dec 2023 10:02:42 +0200 Message-ID: <8334vwgezh.fsf@gnu.org> References: <838r5qib7l.fsf@gnu.org> <83plz1ggua.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67900@debbugs.gnu.org, acorallo@gnu.org To: Chang Xiaoduan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 21 09:04:22 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 1rGE2V-0007mi-Ez for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Dec 2023 09:04:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGE2B-0008Vu-CW; Thu, 21 Dec 2023 03:03:59 -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 1rGE2A-0008Vm-Bx for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 03:03:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rGE2A-00032z-3x for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 03:03:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGE2D-0004gE-Io for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 03:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Dec 2023 08:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67900 X-GNU-PR-Package: emacs Original-Received: via spool by 67900-submit@debbugs.gnu.org id=B67900.170314579717935 (code B ref 67900); Thu, 21 Dec 2023 08:04:01 +0000 Original-Received: (at 67900) by debbugs.gnu.org; 21 Dec 2023 08:03:17 +0000 Original-Received: from localhost ([127.0.0.1]:42330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGE1V-0004fC-5I for submit@debbugs.gnu.org; Thu, 21 Dec 2023 03:03:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGE1Q-0004ex-GF for 67900@debbugs.gnu.org; Thu, 21 Dec 2023 03:03:16 -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 1rGE1D-0002rk-3R; Thu, 21 Dec 2023 03:02:59 -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=Am7LE6qhmiDE+aR/ut8q3Fc+5bzrrPKXxUNo5SBhRWY=; b=pnDyoU43CIzs d6LUZ++5/HuwxPwQcTspAVvG0VNXykgQ/6T98mJXTDzvBIgwk1vvgZnaKLSGip6I9JrhKCz4A1bex cMwPh2byp9fESRmcdElkT6pkjZoa98zcmCMr/874vneXr7RUiWs7CRspgoYrtgrnwigQtU3ukx7vz VGhJrNmQTLDjuFzr1Vl261I5KH6CFj/FRY/fW8Q046gS1oVq/pRYx+SPytAKZyjCV5OK2PJn1KcqV 6ibTTJmB2mOBB7RiVoI+oBTHy0lmdbpFLwwowyQHsQ+vMzGvsT580JghlCtCTGPzDrHsVxIS0AIYS 6Mkf5CFJkjugOhI22Ypgng==; In-Reply-To: (message from Chang Xiaoduan on Thu, 21 Dec 2023 11:26:05 +0800) 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:276616 Archived-At: > From: Chang Xiaoduan > Cc: Andrea Corallo , 67900@debbugs.gnu.org > Date: Thu, 21 Dec 2023 11:26:05 +0800 > > Eli Zaretskii writes: > > > [Please use Reply All to reply, to keep the bug tracker CC'ed.] > > > > This is the first time I report an Emacs bug using E-mails and I am not > familiar with this kind of workflow for reporting a bug and > communication. I have raised some issues on GitHub but that is totally > different and more intuitive. Would you mind introducing me how such a > workflow came into being and why you stick with it? Any links to wiki or > articles are welcomed. It's a long story. In a nutshell, we use email because doing that, together with some features of the debbugs issue tracker, makes it very easy to do everything from Emacs: review patches and send feedback for patches, apply patches that are approved, manage issues (open, close, and reopen them, add and remove tags to issues, etc.), and do other jobs. We are looking into switching to a different issue tracker, which would allow also PR-based workflows and a browser UI to do some of these jobs, but so far every tracker we've examined needed additions and improvements to satisfy our needs, and so we haven't switched yet. > > The above seems to indicate the problems are somehow related to native > > compilation. Can you build Emacs without native-compilation, and try > > reproducing this in such an Emacs? If the problem doesn't happen in > > Emacs without native-compilation, I suspect this is a MinGW GCC bug, > > not an Emacs bug: the native code in *.eln files is somehow invalid. > > I can not reproduce the crash using Emacs without native-compilation. > > > > > Which version of GCC do you have installed, and is libgccjit you have > > is from the same GCC version? > > I am using gcc 13.2.0 and mingw-w64-x86_64-libgccjit 13.2.0-3. > > > > > Or maybe we have a bug in native compilation. Andrea, can you try > > reproducing this on GNU/Linux? > > > > Another idea is to modify comp.el to have native-comp-speed default to > > 1 instead of 2, then rebuild Emacs ("make bootstrap") with CFLAGS='-O1', > > and see if the problem goes away. If it does, that again points > > toward GCC/libgccjit and the compiler optimizations. > > I have modified the `native-comp-speed` to 1, but not specified > `CFLAGS='-O1'`. Though, the resulting Emacs binary does not reproduce > the same crash. > > After all, it looks like Eli's assumption is likely to be true. If you > are familiar with reporting a compiler bug, could you tell me how could > I verify it is indeed a MinGW GCC bug and report this to MinGW? Andrea, can you please help Chang Xiaoduan to create a reproducer in this case, and examine it by comparing with what you see when you native-compile consult-buffer on your system? Maybe we could somehow work around this in Emacs, since IME the libgccjit folks are not very responsive to MinGW-specific bugs. Another idea would be to build Emacs with native-compilation as usual, with native-comp-speed set to 2, but then compile only consult.el with native-comp-speed set to 1. If that also solves the problem, we will know that something in consult.el triggers the problem, and could perhaps try narrowing down the problem to some very specific code in consult.el. Thanks.