GNU bug report logs -
#54079
29.0.50; Method dispatching eratically fails
Previous Next
Full log
Message #50 received at 54079 <at> debbugs.gnu.org (full text, mbox):
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 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.