Subject: bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer'

From: Chang Xiaoduan <[email-masked]>
Date: Tue, 02 Jan 2024 15:24:52 +0800

Andrea Corallo <[email-masked]> writes:

>
> There could be some function generated by macros without the speed
> declaration?  Dunno...
>
> Anyway please try the opposite strategy (CU at speed 2 and functions at
> speed 1) to narrow the function and let us know if it's more successful.
>
> Thanks
>
>   Andrea

Hello,

I just confirmed that when Emacs is built with `native-comp-speed' set
to 2 and only `consult-buffer' has the form `(declare (speed 1))`, I can
still reproduce the crash. However, when all `defun', `defmacro',
`cl-defun' and `defsubst' get the form `(declare (speed 1))`, then the
crash can not be reproduced. Before I investigate further, I am
wondering that is that only one function responsible to the crash? Is it
possible that when 2 or more certain functions get compiled with
`native-comp-speed' set to 2 that the crash can be reproduced? If this
is ture, then I think mannually add declare forms to functions is some
how impossible to find the combination of such functions.

Thanks