GNU bug report logs - #69573
Eager macro-expansion failure: (wrong-type-argument integer-or-marker-p nil)

Previous Next

Package: emacs;

Reported by: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>

Date: Tue, 5 Mar 2024 23:55:01 UTC

Severity: normal

Done: Andrea Corallo <acorallo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Gabriele Nicolardi <gabriele <at> medialab.sissa.it>, 69573 <at> debbugs.gnu.org
Subject: bug#69573: Eager macro-expansion failure: (wrong-type-argument integer-or-marker-p nil)
Date: Sat, 09 Mar 2024 16:41:02 -0500
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> (defalias 're-search-forward-ifpmod (symbol-function 're-search-forward) ...)
> [...]
>> Stefan, can you help maybe?  Gabriele then does this:
> [...]
>> and we have found that this causes weird errors because at least some
>> definitions, like `forward-paragraph', call `re-search-forward-ifpmod'
>> afterwards.  This seems to happen only when using a native compiled
>
> Sounds like a problem in the code that installs trampolines.
>
> Andrea?
>
> If we look at `fset`, the C code does:
>
>     if (!NILP (Vnative_comp_enable_subr_trampolines)
>         && SUBRP (function)
>         && !SUBR_NATIVE_COMPILEDP (function))
>       CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);
>
> so indeed if the SUBR_NATIVE_COMPILEDP function is stored in another
> symbol, we will still call Qcomp_subr_trampoline_install, even tho it's
> a case where it should not be necessary, and I suspect this can lead to
> the kind of problems mentioned above, if we do something like
>
>     (defalias 'foo (symbol-function 'bar))
>     (fset 'foo <something-else>)
>
> where native calls to `bar` could end up redirected to the definition of
> `foo` :-(

Here I'm,

mmmhh, I'm really not sure why calling Qcomp_subr_trampoline_install
should be problematic.  I'll look at it, but this week I'm on holiday so
might take a bit more :)

Bests

  Andrea




This bug report was last modified 1 year and 117 days ago.

Previous Next


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