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

From: Andrea Corallo <[email-masked]>
Date: Fri, 22 Dec 2023 04:38:11 -0500

Eli Zaretskii <[email-masked]> writes:

>> From: Chang Xiaoduan <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
>> Date: Fri, 22 Dec 2023 11:44:57 +0800
>> 
>> Andrea Corallo <[email-masked]> writes:
>> 
>> > But before starting with a blind bisect I think we should try if any of
>> > the .eln present in the back trace is the responsible, AFAICS those are:
>> > bytecomp.el, mule.el, startup.el (with the first being the suspect nr1).
>> 
>> I also use Emacs with the same configuration on a Linux system and it
>> has never crashed while I have been experiencing frequent crashes on
>> Windows. I think it is not reproducible on Linux.
>> 
>> I have tried to build Emacs with native-compilation on and added a
>> file-local prop-line in consult.el setting `native-comp-speed` to 1. The
>> eln cache produced does not trigger the crash. After setting the
>> file-local property `native-comp-spped` back to 2, I easily reproduced
>> the crash. Does this indicate that the miscompiled code is inside
>> consult.el?
>
> It could, but see what Andrea wrote above: it could also be the fault
> of a few other packages involved in this.
>
> So please build Emacs with those 3 packages (bytecomp.el, mule.el,
> startup.el) natively-compiled with native-comp-speed = 1, then
> native-compile consult.el with native-comp-speed = 2, and see if you
> still see the crashes.  If yes, then consult.el is probably the one
> that triggers the bug.  If compiling those 3 other packages with
> native-comp-speed = 1 eliminates the crashes, then we need to look for
> the one of those 3 which triggers the crash, and continue narrowing
> this down from there.

I agree, that's a good advice, let's investigate this bit first.

Thanks

  Andrea