GNU bug report logs - #54079
29.0.50; Method dispatching eratically fails

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 21 Feb 2022 00:14:02 UTC

Severity: normal

Found in version 29.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Lars Ingebrigtsen <larsi <at> gnus.org>, 54079 <at> debbugs.gnu.org
Subject: bug#54079: 29.0.50; Method dispatching eratically fails
Date: Sat, 5 Mar 2022 19:00:49 +0000
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).




This bug report was last modified 3 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.