Subject: bug#67141: 30.0.50; Missing element in the backtrace

From: Andrea Corallo <[email-masked]>
Date: Thu, 16 Nov 2023 04:35:48 -0500

Andrea Corallo <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>>> Date: Sun, 12 Nov 2023 17:29:27 -0500
>>> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>>>  the Swiss army knife of text editors" <[email-masked]>
>>> 
>>> Package: Emacs
>>> Version: 30.0.50
>>> 
>>> 
>>>     emacs -Q
>>>     (this is an unquoted list)
>>>     C-j
>>> 
>>> Gives me:
>>> 
>>>     Debugger entered--Lisp error: (void-function this)
>>>       (this is an unquoted list)
>>>       (progn (this is an unquoted list))
>>>       elisp--eval-last-sexp(t)
>>>       eval-last-sexp(t)
>>>       eval-print-last-sexp(nil)
>>>       funcall-interactively(eval-print-last-sexp nil)
>>>       command-execute(eval-print-last-sexp)
>>> 
>>> But `elisp--eval-last-sexp` doesn't directly run that `progn`.
>>> Instead it calls `eval` to do so.  Where did `eval` go?
>>> 
>>> I see this both in Debian's Emacs-28,2 as well as on `master`.
>>> In both cases, this is using the native compiler.
>>> I have a local Emacs with various patches but without using the native
>>> compiler and the problem doesn't appear there.
>>> So my crystal ball pointed their pointy finger at the native code compiler.
>>
>> Adding Andrea.
>
> Thanks,
>
> mmmh, my crystal ball suggests that some (native compiled) code is
> calling directly a primitive (eval) without going through funcall, as a
> consequence no backtrace is recorded.  AFAIR that's what happen with
> byte compiled code with primitves with assigned (byte)op-code as well.

PS and indeed similarly what happen calling a primitive from other C
code.

  Andrea