From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 08:58:05 2022 Received: (at submit) by debbugs.gnu.org; 17 Apr 2022 12:58:05 +0000 Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Td-0005Jk-JH for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:58:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:41784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Tb-0005Jd-Vq for submit@debbugs.gnu.org; Sun, 17 Apr 2022 08:58:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng4Tb-0008Lh-NA for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 08:58:03 -0400 Received: from colin.muc.de ([193.149.48.1]:27942 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1ng4TY-0003Uy-LX for bug-gnu-emacs@gnu.org; Sun, 17 Apr 2022 08:58:03 -0400 Received: (qmail 8775 invoked by uid 3782); 17 Apr 2022 12:31:16 -0000 Received: from acm.muc.de (p2e5d5c92.dip0.t-ipconnect.de [46.93.92.146]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 17 Apr 2022 14:31:16 +0200 Received: (qmail 27823 invoked by uid 1000); 17 Apr 2022 12:31:16 -0000 Date: Sun, 17 Apr 2022 12:31:16 +0000 To: bug-gnu-emacs@gnu.org Subject: Byte compiler bug Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Hello, Emacs. In up to date master branch: (i) emacs -Q (ii) Enter the following into buffer *scratch*: (defun E+->E@+ (elt op) (cond ((eq op '+) (setcar elt '*)) ((eq op '+\?) (setcar elt '*\?)))) (defconst foo-elt '(+\? . "foo")) (E+->E@+ foo-elt '+\?) . (iii) With point in the defun, M-x compile-defun. (iv) Evaluate the defconst. (v) Evaluate the E+->E@+ form. (vi) M-: foo-elt. It's value is unchanged from its declaration. It should have been changed to (*\? . "foo"). This is a bug. (vii) M-x disassemble RET E+->E@+. Instead of working, this gives the error message: Optimizer error: missed tags (((TAG 2) TAG 4) ((TAG 1) TAG 3)) . This is a bug. (viii) (Optional) Evaluate the defun form with C-M-x, and evaluate the E+->E@+ form. M-: foo-elt. This shows the expected value, (*? . "foo"). At a guess, the symbols with the \? in their names have something to do with the bug. Here is my configuration: In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.16.0) of 2022-04-17 built on ACM Repository revision: 2136db067f4292d84553ebfddab30d88b862262e Repository branch: master System Description: Gentoo/Linux Configured using: 'configure --with-gif=no --with-tiff=no --with-gpm --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM GTK3 ZLIB -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 09:02:47 2022 Received: (at 54990) by debbugs.gnu.org; 17 Apr 2022 13:02:47 +0000 Received: from localhost ([127.0.0.1]:35234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4YB-0005SF-5C for submit@debbugs.gnu.org; Sun, 17 Apr 2022 09:02:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng4Y8-0005S1-VR for 54990@debbugs.gnu.org; Sun, 17 Apr 2022 09:02:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eC1XBHnF6Smv2gm9ofbTVHJsdaeq4IyJ49zd5s+t9/E=; b=CyIoBLg8mbf6Snej1cX2bDFqx4 nz5gAtNWA7L5soGn/csa2sJfwpS90yUrgdVL0oRl76sl9oS283DLh6S7XDl6LZAM8L4y6PKT6zvzU MnrpBl5a0pA2eW2MqX3c0/H+fNFRa9WZbjKk5rrCkR72MoKTHhf7vy2BXBPD/SZRI8JQ=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng4Xy-0005SK-90; Sun, 17 Apr 2022 15:02:38 +0200 From: Lars Ingebrigtsen To: Alan Mackenzie Subject: Re: bug#54990: Byte compiler bug References: Date: Sun, 17 Apr 2022 15:02:33 +0200 In-Reply-To: (Alan Mackenzie's message of "Sun, 17 Apr 2022 12:31:16 +0000") Message-ID: <87o80z982e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: > At a guess, the symbols with the \? in their names have something to do > with the bug. Could this be related to 637dde4ab? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54990 Cc: 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Mackenzie writes: > At a guess, the symbols with the \? in their names have something to do > with the bug. Could this be related to 637dde4ab? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 09:53:42 2022 Received: (at 54990) by debbugs.gnu.org; 17 Apr 2022 13:53:42 +0000 Received: from localhost ([127.0.0.1]:35250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng5LR-0006gZ-T3 for submit@debbugs.gnu.org; Sun, 17 Apr 2022 09:53:42 -0400 Received: from colin.muc.de ([193.149.48.1]:45841 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ng5LO-0006gG-Hq for 54990@debbugs.gnu.org; Sun, 17 Apr 2022 09:53:40 -0400 Received: (qmail 62711 invoked by uid 3782); 17 Apr 2022 13:53:31 -0000 Received: from acm.muc.de (p2e5d5c92.dip0.t-ipconnect.de [46.93.92.146]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 17 Apr 2022 15:53:31 +0200 Received: (qmail 5791 invoked by uid 1000); 17 Apr 2022 13:53:31 -0000 Date: Sun, 17 Apr 2022 13:53:31 +0000 To: Lars Ingebrigtsen Subject: Re: bug#54990: Byte compiler bug Message-ID: References: <87o80z982e.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o80z982e.fsf@gnus.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54990 Cc: 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Lars. On Sun, Apr 17, 2022 at 15:02:33 +0200, Lars Ingebrigtsen wrote: > Alan Mackenzie writes: > > At a guess, the symbols with the \? in their names have something to do > > with the bug. > Could this be related to 637dde4ab? It isn't, no. The bug is in git checkout 637dde4ab^. I've checked Emacs 28.1, the bug is not there, thankfully. It looks like I've got an afternoon of bisecting facing me. ;-) > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 17 10:33:05 2022 Received: (at 54990) by debbugs.gnu.org; 17 Apr 2022 14:33:05 +0000 Received: from localhost ([127.0.0.1]:36852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng5xZ-0001rG-Ci for submit@debbugs.gnu.org; Sun, 17 Apr 2022 10:33:05 -0400 Received: from mail1452c50.megamailservers.eu ([91.136.14.52]:38517 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ng5xW-0001qh-RS for 54990@debbugs.gnu.org; Sun, 17 Apr 2022 10:33:03 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1650205975; bh=rH0PhieDLl715Fdz5s6+DOBepNJL2DJfE/2/8TtdMjw=; h=From:Subject:Date:Cc:To:From; b=YA+o0qeKBuEX4zsqtHgO9TAK3VKvBCHB3PeAolDjP8+PpPBxa4iVs/vZs/JdHFGmB x1SUtWnHed6nlMgu8w+6Q3urZ5YLcWYEr9LHr+kTurjAYdamGqxStE8Zne6A6UOmCm 75ee3+NxCDVWsoJ5LW78ZCHLg3Y/HzsIQUYYRIPU= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 23HEWrkV015032; Sun, 17 Apr 2022 14:32:55 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: bug#54990: Byte compiler bug Message-Id: Date: Sun, 17 Apr 2022 16:32:53 +0200 To: Alan Mackenzie X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F24.625C2517.0035, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is related to symbol positioning so Alan should be well-placed to debug it. (The symbol names are irrelevant.) It's `compile-defun` that is broken; the constant vector of the resulting bytecode contains symbols with position as hash table keys for a switch operation. Compare the bytecode object with that from [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 54990 Cc: Lars Ingebrigtsen , 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is related to symbol positioning so Alan should be well-placed to = debug it. (The symbol names are irrelevant.) It's `compile-defun` that is broken; the constant vector of the = resulting bytecode contains symbols with position as hash table keys for = a switch operation. Compare the bytecode object with that from = `byte-compile` which works correctly: (defun tata (x) (cond ((eq x 'a) 'toto) ((eq x 'b) 'titi))) (byte-compile 'tata) =3D> #[257 "..." [#s(hash-table size 2 test eq rehash-size 1.5 = rehash-threshold 0.8125 purecopy t data (a 6 b 8)) toto titi nil] 3 = "..."] ;; if using `compile-defun` on `tata`: (symbol-function 'tata) #[257 "..." [#s(hash-table size 2 test eq rehash-size 1.5 = rehash-threshold 0.8125 purecopy t data (# 6 # 8)) toto titi nil] 3 "..."] From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 18 06:48:52 2022 Received: (at 54990-done) by debbugs.gnu.org; 18 Apr 2022 10:48:52 +0000 Received: from localhost ([127.0.0.1]:38165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngOw8-0002FL-LQ for submit@debbugs.gnu.org; Mon, 18 Apr 2022 06:48:52 -0400 Received: from colin.muc.de ([193.149.48.1]:51659 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ngOw7-0002F7-63 for 54990-done@debbugs.gnu.org; Mon, 18 Apr 2022 06:48:51 -0400 Received: (qmail 8221 invoked by uid 3782); 18 Apr 2022 10:48:44 -0000 Received: from acm.muc.de (p4fe15b93.dip0.t-ipconnect.de [79.225.91.147]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 18 Apr 2022 12:48:43 +0200 Received: (qmail 6989 invoked by uid 1000); 18 Apr 2022 10:48:43 -0000 Date: Mon, 18 Apr 2022 10:48:43 +0000 To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#54990: Byte compiler bug Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54990-done Cc: acm@muc.de, Lars Ingebrigtsen , 54990-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Mattias. On Sun, Apr 17, 2022 at 16:32:53 +0200, Mattias Engdegård wrote: > This is related to symbol positioning so Alan should be well-placed to > debug it. (The symbol names are irrelevant.) I'd got just as far as identifying the merge of scratch/correct-warning-pos as the first version containing the bug. > It's `compile-defun` that is broken; the constant vector of the > resulting bytecode contains symbols with position as hash table keys > for a switch operation. Compare the bytecode object with that from > `byte-compile` which works correctly: Thank you for this observation. It was _exceptionally_ helpful. > (defun tata (x) > (cond > ((eq x 'a) 'toto) > ((eq x 'b) 'titi))) > (byte-compile 'tata) > => > #[257 "..." [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (a 6 b 8)) toto titi nil] 3 "..."] > ;; if using `compile-defun` on `tata`: > (symbol-function 'tata) > #[257 "..." [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (# 6 # 8)) toto titi nil] 3 "..."] I've committed a fix, which I'm pretty sure works, so I'm closing the bug with this post. Thanks again for the help! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 18 11:43:54 2022 Received: (at 54990-done) by debbugs.gnu.org; 18 Apr 2022 15:43:54 +0000 Received: from localhost ([127.0.0.1]:40460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngTXe-0002Lk-6X for submit@debbugs.gnu.org; Mon, 18 Apr 2022 11:43:54 -0400 Received: from mail154c50.megamailservers.eu ([91.136.10.164]:37918 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngTXb-0002LZ-HR for 54990-done@debbugs.gnu.org; Mon, 18 Apr 2022 11:43:52 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1650296629; bh=hDN4vSn738y9VLpxzbLHy6ipSXwMDY0GgFUjlSiT9cs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=e7g77qQi/lt80CTHZm/6BVccH4Q9FXts8/doVJ/OwQREnvf7Z7VYG0TC7a6/tExcg Yc7feW9fBHhtAl2nxC3/Hq4i0J5WFsaCBEvQsM/PvocH6uexymxz0fcMbTyDf5dGUb 3GX1rCOMFCzGgLR0gd0tKqdAGIpgIns8zDtgKCqc= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 23IFhl5c031248; Mon, 18 Apr 2022 15:43:48 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#54990: Byte compiler bug From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 18 Apr 2022 17:43:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> References: To: Alan Mackenzie X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F20.625D8735.0044, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 18 apr. 2022 kl. 12.48 skrev Alan Mackenzie : > I've committed a fix, which I'm pretty sure works, so I'm closing the bug > with this post. Very happy to see that you found a solution quickly! Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 54990-done Cc: Lars Ingebrigtsen , 54990-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 18 apr. 2022 kl. 12.48 skrev Alan Mackenzie : > I've committed a fix, which I'm pretty sure works, so I'm closing the = bug > with this post. Very happy to see that you found a solution quickly! A few items of concern: 1. There should be a regression test for it -- don't you agree? 2. Your solution comprises stripping position from symbols during the = lowering of lapcode to bytecode. Why did this bug only affect = `compile-defun`, not `byte-compile` or `byte-compile-file`? The change = is in code common to all three. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 20 15:33:51 2022 Received: (at 54990) by debbugs.gnu.org; 20 Apr 2022 19:33:51 +0000 Received: from localhost ([127.0.0.1]:47544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhG5G-0001TY-Pd for submit@debbugs.gnu.org; Wed, 20 Apr 2022 15:33:50 -0400 Received: from colin.muc.de ([193.149.48.1]:54828 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nhG5F-0001TI-Af for 54990@debbugs.gnu.org; Wed, 20 Apr 2022 15:33:49 -0400 Received: (qmail 83786 invoked by uid 3782); 20 Apr 2022 19:33:42 -0000 Received: from acm.muc.de (p4fe15b88.dip0.t-ipconnect.de [79.225.91.136]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 20 Apr 2022 21:33:41 +0200 Received: (qmail 8837 invoked by uid 1000); 20 Apr 2022 19:33:41 -0000 Date: Wed, 20 Apr 2022 19:33:41 +0000 To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#54990: Byte compiler bug Message-ID: References: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54990 Cc: acm@muc.de, Lars Ingebrigtsen , 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Mattias. On Mon, Apr 18, 2022 at 17:43:46 +0200, Mattias Engdegård wrote: > 18 apr. 2022 kl. 12.48 skrev Alan Mackenzie : > > I've committed a fix, which I'm pretty sure works, so I'm closing the bug > > with this post. > Very happy to see that you found a solution quickly! > A few items of concern: > 1. There should be a regression test for it -- don't you agree? I suppose so. > 2. Your solution comprises stripping position from symbols during the > lowering of lapcode to bytecode. Yes. It preserves symbols' positions as long as possible. > Why did this bug only affect `compile-defun`, not `byte-compile` or > `byte-compile-file`? The change is in code common to all three. Yes, I find that intriguing, too. I'm meaning to try to find out why that was the case. The first priority was to fix the bug. The differences between the ways the compiler was called might hide further bugs, though. So, I haven't forgotten this. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 05:50:12 2022 Received: (at 54990) by debbugs.gnu.org; 21 Apr 2022 09:50:12 +0000 Received: from localhost ([127.0.0.1]:48445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhTS0-0006fr-0k for submit@debbugs.gnu.org; Thu, 21 Apr 2022 05:50:12 -0400 Received: from colin.muc.de ([193.149.48.1]:19334 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nhTRu-0006f7-J3 for 54990@debbugs.gnu.org; Thu, 21 Apr 2022 05:50:10 -0400 Received: (qmail 52924 invoked by uid 3782); 21 Apr 2022 09:49:59 -0000 Received: from acm.muc.de (p4fe15a1f.dip0.t-ipconnect.de [79.225.90.31]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 21 Apr 2022 11:49:58 +0200 Received: (qmail 3561 invoked by uid 1000); 21 Apr 2022 09:49:58 -0000 Date: Thu, 21 Apr 2022 09:49:58 +0000 To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#54990: Byte compiler bug Message-ID: References: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 54990 Cc: Lars Ingebrigtsen , 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Mattias. On Wed, Apr 20, 2022 at 19:33:41 +0000, Alan Mackenzie wrote: > On Mon, Apr 18, 2022 at 17:43:46 +0200, Mattias Engdegård wrote: > > 18 apr. 2022 kl. 12.48 skrev Alan Mackenzie : [ .... ] > > Why did this bug only affect `compile-defun`, not `byte-compile` or > > `byte-compile-file`? The change is in code common to all three. > Yes, I find that intriguing, too. I'm meaning to try to find out why > that was the case. The first priority was to fix the bug. The > differences between the ways the compiler was called might hide further > bugs, though. This is now clear. byte-compile is compiling a form, not source code, so unless the form was read with symbol positions, it won't have them. In byte-compile-file, symbol positions are stripped as the byte code gets output to the file.elc. So the symbol positions were not in the ..elc. Only in compile-defun were there positions, and they "survived". So I don't think there is a problem here. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 09:45:37 2022 Received: (at 54990) by debbugs.gnu.org; 2 May 2022 13:45:38 +0000 Received: from localhost ([127.0.0.1]:35191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlWMr-0003FD-Kj for submit@debbugs.gnu.org; Mon, 02 May 2022 09:45:37 -0400 Received: from mail1458c50.megamailservers.eu ([91.136.14.58]:45504 helo=mail267c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlWMp-0003Ey-LY for 54990@debbugs.gnu.org; Mon, 02 May 2022 09:45:36 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1651499128; bh=HpTxAb5cYu3CoJ0rYaWTVhsTLv1/a6qo0yDOSPhpmIw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HHaoN0UgaNoHOUMtcwOTUGKBOCvEOrJoQ6/yohuOGAP5pXC+FygO+yfD0w002jJic A50T+10N3/RLlQxjZmd8k6C319HovswS8Fq+LdJVPC1IXVzC9/1uyKO+kis+CbSv3D cyRjNQDbSmoCU47VFtG/4D9G1b52LQ84BuShqGuM= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 242DjQhm031266; Mon, 2 May 2022 13:45:27 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#54990: Byte compiler bug From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 2 May 2022 15:45:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> To: Alan Mackenzie X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F23.626FE078.008F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 21 apr. 2022 kl. 11.49 skrev Alan Mackenzie : > This is now clear. byte-compile is compiling a form, not source code, > so unless the form was read with symbol positions, it won't have them. > In byte-compile-file, symbol positions are stripped a [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 54990 Cc: Lars Ingebrigtsen , 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 21 apr. 2022 kl. 11.49 skrev Alan Mackenzie : > This is now clear. byte-compile is compiling a form, not source code, > so unless the form was read with symbol positions, it won't have them. > In byte-compile-file, symbol positions are stripped as the byte code > gets output to the file.elc. So the symbol positions were not in the > ..elc. >=20 > Only in compile-defun were there positions, and they "survived". Thank you for dealing with this. My next question would be why the bug = only affected switch hash table keys and no other constants. Do you = know? And why did you decide to strip the keys at that point (lowering from = LAP), and not where other constants are stripped? I see that you have committed more corrections since; were these = related? From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 14:46:54 2022 Received: (at 54990) by debbugs.gnu.org; 2 May 2022 18:46:54 +0000 Received: from localhost ([127.0.0.1]:38004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlb4Q-0003yB-H5 for submit@debbugs.gnu.org; Mon, 02 May 2022 14:46:54 -0400 Received: from colin.muc.de ([193.149.48.1]:29014 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nlb4P-0003xn-6R for 54990@debbugs.gnu.org; Mon, 02 May 2022 14:46:53 -0400 Received: (qmail 43514 invoked by uid 3782); 2 May 2022 18:46:46 -0000 Received: from acm.muc.de (p4fe15a64.dip0.t-ipconnect.de [79.225.90.100]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 02 May 2022 20:46:45 +0200 Received: (qmail 3320 invoked by uid 1000); 2 May 2022 18:46:45 -0000 Date: Mon, 2 May 2022 18:46:45 +0000 To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#54990: Byte compiler bug Message-ID: References: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54990 Cc: acm@muc.de, Lars Ingebrigtsen , 54990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Mattias. On Mon, May 02, 2022 at 15:45:25 +0200, Mattias Engdegård wrote: > 21 apr. 2022 kl. 11.49 skrev Alan Mackenzie : > > This is now clear. byte-compile is compiling a form, not source code, > > so unless the form was read with symbol positions, it won't have them. > > In byte-compile-file, symbol positions are stripped as the byte code > > gets output to the file.elc. So the symbol positions were not in the > > ..elc. > > Only in compile-defun were there positions, and they "survived". > Thank you for dealing with this. My next question would be why the bug > only affected switch hash table keys and no other constants. Do you > know? The handling of a cond form which compiles to a hash table is anamolous. This table is essentially byte code, yet is created in an early phase of the compilation, when symbols still have their positions. So these positions have to be handled specially. Other forms are converted to byte code in a later phase of the compiler, when (nearly) all symbols have their positions stripped. > And why did you decide to strip the keys at that point (lowering from > LAP), and not where other constants are stripped? To be honest, I can't really remember; I might not have been aware of any anomaly, here. As a general principle, the positions on symbols are preserved as long as possible, in case a warning message is yet to be output. > I see that you have committed more corrections since; were these > related? No, they were not. They were to do with other problems. -- Alan Mackenzie (Nuremberg, Germany). From unknown Tue Aug 19 02:57:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 31 May 2022 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator