From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46670: 28.0.50; [feature/native-comp] possible miscompilation affecting lsp-mode Date: Tue, 23 Feb 2021 23:26:25 +0000 Message-ID: References: <87a6ry46uc.fsf@collares.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9790"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46670@debbugs.gnu.org, Pip Cet To: Mauricio Collares Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 24 00:27:10 2021 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 1lEh5B-0002Sl-R3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Feb 2021 00:27:09 +0100 Original-Received: from localhost ([::1]:59422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEh5A-0005wo-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Feb 2021 18:27:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEh54-0005wJ-24 for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 18:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEh53-0000F2-Qr for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 18:27:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lEh53-0003sX-Lc for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2021 18:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Feb 2021 23:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46670 X-GNU-PR-Package: emacs Original-Received: via spool by 46670-submit@debbugs.gnu.org id=B46670.161412279614878 (code B ref 46670); Tue, 23 Feb 2021 23:27:01 +0000 Original-Received: (at 46670) by debbugs.gnu.org; 23 Feb 2021 23:26:36 +0000 Original-Received: from localhost ([127.0.0.1]:60923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEh4d-0003rt-OT for submit@debbugs.gnu.org; Tue, 23 Feb 2021 18:26:35 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:54655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEh4b-0003rj-81 for 46670@debbugs.gnu.org; Tue, 23 Feb 2021 18:26:34 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 11NNQPXN006778 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 23 Feb 2021 23:26:25 GMT In-Reply-To: (Andrea Corallo via's message of "Tue, 23 Feb 2021 09:04:46 +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" Xref: news.gmane.io gmane.emacs.bugs:200687 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: [...] > Hi Pip thanks for the patch, > > the approach of adding a cstr directly in the assume works for this case > but is not generic as referencing there an mvar. > > The reason is that a later run of fw-prop after add-cstrs might be able > to prove more precisely what the mvar is if the code was morphed in the > meanwhile by some other pass. This in contrast with adding a cstr that > being "written into the stone" will stay as such no matter what. > > Admittedly ATM the only pass rewriting some code after assumes are > placed and before the last fw-prop is run is 'tco' so this might be a > real case only for functions affected by this, but in the future we may > (and most likely want to) have more passes in that position of the > compiler pipeline. > > So yeah I still prefer to general approach of keeping an mvar live till > there and referencing it in the assume so that any future propagation > within the SSA lattice can update this. > > Yesterday evening I did some work in that direction, doesn't look too > invasive or complex. I'll finish it this week as soon as I've some more > time to put into. > > Thanks > > Andrea Right I've pushed bddd7a2d13 implementing the discussed solution as I'm convinced is more general and future proof. The patch is passing the tests and bootstrapping clean, also is adding a test that should cover this specific bug. Mauricio could you verify it actually solves the lsp-mode issue? Thanks Andrea