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#71744: 29.4; SIGSEGV during completion-at-point in lsp-mode with corfu and cape Date: Sat, 17 Aug 2024 09:14:56 +0300 Message-ID: <865xrz65gf.fsf@gnu.org> References: <86mslf8axb.fsf@gnu.org> <86ed6r8535.fsf@gnu.org> <86cymb846o.fsf@gnu.org> <87jzgi17dy.fsf@protonmail.com> <87h6bkjyj1.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10505"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, 71744@debbugs.gnu.org, sigve.indregard@pm.me To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 08:16:08 2024 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 1sfCjO-0002aC-Nd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 08:16:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfCj1-0004aC-ML; Sat, 17 Aug 2024 02:15:47 -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 1sfCii-0004Rp-4U for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 02:15:33 -0400 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 1sfCih-0003jp-J6 for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 02:15:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ATTTrBMLtjeTsT0XTdMLxt9w9xrIreHSkuYK4DP3WqQ=; b=IrfurVk5R1qrZKWMxYwT8nW8xSx0zSumuofiami0gueCmPfqAr7x5Cq5jZGqClRxxx8Qo4T6kg3kENFyJxUDsEPWyVSb3cGKkRFh4c+B4pY38RXqwjHSZ/U/HUBBtw/ATaolUcOnYy+wMJsIEQUvYf0oGgKhYiI0s7UqLhSMFHgsQ87BjrHrmvhPMGnIJeNNY285/RQ5YPLLr9+eqqYLlKe+XfZr0kKNEx/d4oxOF7QRXe6Q8MClx/XFe1Wb29mfmWxBXjC31jWWZV84/DXhnpOLVv6oDiVSy2H1wnuFDl2Y2Rj48y428ZVHWtpEUQ/MaBp124DioZ+T5KraTHC7IA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfCjJ-0005R0-T1 for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 02:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Aug 2024 06:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71744 X-GNU-PR-Package: emacs Original-Received: via spool by 71744-submit@debbugs.gnu.org id=B71744.172387534620867 (code B ref 71744); Sat, 17 Aug 2024 06:16:01 +0000 Original-Received: (at 71744) by debbugs.gnu.org; 17 Aug 2024 06:15:46 +0000 Original-Received: from localhost ([127.0.0.1]:53271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfCj3-0005QV-P6 for submit@debbugs.gnu.org; Sat, 17 Aug 2024 02:15:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfCj1-0005QE-Sw for 71744@debbugs.gnu.org; Sat, 17 Aug 2024 02:15:44 -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 1sfCiI-0003WX-Ie; Sat, 17 Aug 2024 02:14:58 -0400 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=ATTTrBMLtjeTsT0XTdMLxt9w9xrIreHSkuYK4DP3WqQ=; b=RZfT/kqdt3Qv 0UIrX7Tp/zT+vqKT6tMJzmE4hy+nDORhsEw3/IvWZ3Ok7Iz/J46ixYhcjSOIGH9+B6J8B4zUttgrw +vb14AEaAEt+UtYC0WJLPADg6VsaeuQ3Vusd+9LKnrouXZS9z50eFOfq1VE6U+nOuIfWsD8Skc5UM TfYNzIXA+Nn/T3bDsCygOo6MDK4UBwbtWbB2o/PWJXAAS9XtNkMLbojfMYYAJGWIy8JQedqlxU1j1 taMuj//EkJu7rCfslMsHtDLqjR+3T6n0NzBPO3YFCfOd1tqhICZqRi8pYWe406wqpWvDl+0Jjvfwk bf6WG2ZnoUK1I3Zys3Dllg==; In-Reply-To: (message from Paul Eggert on Fri, 16 Aug 2024 21:37:29 -0700) 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:290215 Archived-At: > Date: Fri, 16 Aug 2024 21:37:29 -0700 > Cc: sigve.indregard@pm.me, 71744@debbugs.gnu.org > From: Paul Eggert > > > Paul, do you agree that we should simply mark 'c' as volatile, or do you > > think this needs further investigation on the GCC side (because of the > > lack of a -Wclobbered warning being issued, or because of the weird > > code)? > > We definitely should mark 'c' as volatile, or do something equivalent, > because the Emacs code violates the C standard. > > Also, if my hypothesis of the mistaken identifier is correct, we should > stop ignoring -Wclobbered, and instead pacify GCC without using > -Wclobbered. That way, when we screw up in setjmp related code, we'll > get *some* warning that *something* is being clobbered, and can investigate. > > To do that, I installed the attached patches into the Emacs master > branch. While looking into this I noticed several uses of clobbered > variables (i.e., violations of the C standard) and fixed them. Patches > 0001-0004 fix these similar bugs elsewhere. Patch 0005 implements your > suggestion and should fix Bug#71744. Patch 0006 is a minor performance > improvement over Patch 0005. > > Please give these patches a try. Patch 0005 is simple and if it works > for the original bug reporter we should be able to close the bug report > as fixed. Thanks, but since the original bug exists on the emacs-30 release branch and causes crashes, we need to install some part of these patches on the emacs-30 branch. Can you please suggest for the release branch some safe subset of this, which targets the known issue in read_char? Is it Patch #5 without removing the -Wclobbered diagnostic? Or is it something else?