From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#54079: 29.0.50; Method dispatching eratically fails Date: Sat, 5 Mar 2022 19:00:49 +0000 Message-ID: References: <87bkz113hz.fsf@web.de> <87mtik3l54.fsf@web.de> <87ilt6bgnt.fsf@web.de> <87sfsapgv0.fsf@web.de> <87o82ypfxz.fsf@web.de> <875youbhbu.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35525"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , Lars Ingebrigtsen , 54079@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 05 20:01:11 2022 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 1nQZeQ-000994-Ve for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Mar 2022 20:01:10 +0100 Original-Received: from localhost ([::1]:36596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQZeP-0003Ol-J8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Mar 2022 14:01:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQZeJ-0003Nu-2h for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2022 14:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQZeI-00008G-Q5 for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2022 14:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQZeI-00082S-N3 for bug-gnu-emacs@gnu.org; Sat, 05 Mar 2022 14:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Mar 2022 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54079 X-GNU-PR-Package: emacs Original-Received: via spool by 54079-submit@debbugs.gnu.org id=B54079.164650685930880 (code B ref 54079); Sat, 05 Mar 2022 19:01:02 +0000 Original-Received: (at 54079) by debbugs.gnu.org; 5 Mar 2022 19:00:59 +0000 Original-Received: from localhost ([127.0.0.1]:49073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQZeF-00081z-5K for submit@debbugs.gnu.org; Sat, 05 Mar 2022 14:00:59 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:53300 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nQZeD-00081j-Fr for 54079@debbugs.gnu.org; Sat, 05 Mar 2022 14:00:58 -0500 Original-Received: (qmail 59763 invoked by uid 3782); 5 Mar 2022 19:00:50 -0000 Original-Received: from acm.muc.de (p2e5d5265.dip0.t-ipconnect.de [46.93.82.101]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 05 Mar 2022 20:00:49 +0100 Original-Received: (qmail 6795 invoked by uid 1000); 5 Mar 2022 19:00:49 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:228037 Archived-At: Hello, Stefan. On Sat, Mar 05, 2022 at 12:57:09 -0500, Stefan Monnier wrote: > > I think this problem can only happen for defuns/defvars/defconts inside > > eval-when-compile or eval-and-compile. > > Would you try out the following patch, please, which I believe fixes the > > bug. > Any chance we could fix it in `bytecomp.el` by calling > `byte_run_strip_symbol_positions` before evaluating the contents of > those forms? I've spent quite a large part of the day trying to get that to work, without success. The point is, we want to strip the positions here only when we're writing the value to a defun/defvar/defconst. eval-when/and-compile doesn't know what its forms will be doing, and there's no easy way to find out - for example, there might be a defun in a nested eval-when/and-compile. Checking in the defun/defvar/defconst special forms is direct and economical. > Maybe we should have a function to check for the absence of > sympos which we could call (when in debugging mode only) from > defvar/defalias and friends, which could give us useful backtraces > showing where/when the sympos "leak"? That's an interesting idea. Such a function would differ from byte-run-strip-symbol-positions only a little bit. > Stefan [ .... ] -- Alan Mackenzie (Nuremberg, Germany).