GNU bug report logs -
#61880
Native compilation fails to generate trampolines on certain scenarios
Previous Next
Full log
View this message in rfc822 format
> From: Andrea Corallo <akrl <at> sdf.org>
> Cc: sergiodj <at> sergiodj.net, 61880 <at> debbugs.gnu.org
> Date: Sat, 04 Mar 2023 00:20:41 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Should we start with these?
> >
> > Yes, I think we should start with those, and add more as we discover
> > them.
>
> BTW would you like to suggest a warning message?
Something like
Redefining `%s' while compiling trampolines might fail compilation.
where %s is the primitive name.
> Should we say that redefining this primitive breaks Emacs in general or
> be more specific on the trampoline mechanism?
The latter, I think.
> I ask as I'm a little puzzled on what to say as there's certanly a ton
> of other primitives that when redefined breaks Emacs somewere else than
> the trampoline machinery, so maybe we should be not too generic if we
> want to have this warning also for nativecomp. At the same time I feel
> beeing too specific in the message would be not ideal.
It's true that redefining arbitrary primitive is inherently dangerous,
but as long as that danger just causes the programmer shoot themselves
in the foot, that is their problem. Here we are talking about a
mechanism -- native compilation of primitives -- that gets activated
implicitly, not by any request of the program that runs, so it's a bit
different.
Btw, an alternative is to automatically disable trampoline compilation
if we detect one of the critical primitives redefined. Then we could
say in the warning
Native compilation of trampolines disabled because `%s' is redefined.
WDYT about this possibility?
This bug report was last modified 2 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.