From: Andrea Corallo <acorallo@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
Gabriele Nicolardi <gabriele@medialab.sissa.it>,
69573@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 [thread overview]
Message-ID: <yp1frwzw0b5.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwv8r2rwjua.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 09 Mar 2024 09:47:06 -0500")
Stefan Monnier <monnier@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
next prev parent reply other threads:[~2024-03-09 21:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 23:53 bug#69573: Eager macro-expansion failure: (wrong-type-argument integer-or-marker-p nil) Gabriele Nicolardi
2024-03-06 0:31 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-06 5:16 ` Gabriele Nicolardi
2024-03-07 2:52 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 5:55 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-07 16:26 ` Gabriele Nicolardi
2024-03-09 4:30 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09 14:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09 21:41 ` Andrea Corallo [this message]
2024-03-09 21:48 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-15 13:52 ` Andrea Corallo
2024-03-15 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-15 16:22 ` Gabriele Nicolardi
2024-03-15 16:58 ` Andrea Corallo
2024-03-17 9:30 ` Gabriele Nicolardi
2024-03-15 17:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-17 9:33 ` Gabriele Nicolardi
2024-03-18 9:35 ` Andrea Corallo
2024-03-18 17:28 ` Gabriele Nicolardi
2024-03-18 19:42 ` Andrea Corallo
2024-03-26 7:34 ` Andrea Corallo
2024-03-09 4:33 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09 7:14 ` Gabriele Nicolardi
2024-03-06 5:42 ` Gabriele Nicolardi
2024-03-07 3:15 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yp1frwzw0b5.fsf@fencepost.gnu.org \
--to=acorallo@gnu.org \
--cc=69573@debbugs.gnu.org \
--cc=gabriele@medialab.sissa.it \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).