GNU bug report logs - #67900
30.0.50; Emacs Crahes When Executing Command `consult-buffer'

Previous Next

Package: emacs;

Reported by: Chang Xiaoduan <drcxd <at> sina.com>

Date: Tue, 19 Dec 2023 12:54:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Chang Xiaoduan <drcxd <at> sina.com>
Cc: 67900 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer'
Date: Fri, 29 Dec 2023 13:37:23 -0500
Chang Xiaoduan <drcxd <at> sina.com> writes:

> Andrea Corallo <acorallo <at> gnu.org> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> I think the next step is to narrow down the miss-compiled function.  For
>> that we can tweak speed on function basis like:
>>
>> (defun foo (x y)
>>   (declare (speed 1))
>>   (+ x y))
>>
>> As usual I'd start probing the suspect function `consult-buffer` and if
>> we find is not the coolprint I'd probably bisect all the functions in
>> the compilation unit.
>>
>> Thanks
>>
>>   Andrea
>
> I have done this differently: I use an Emacs compiled with
> `native-comp-speed` set to 1. Then I add the `declare` form to all the
> `defun`, `cl-defun`, `defmacro` and `defsubst`, for example:
>
> ```
> (defun consult--customize-put (cmds prop form)
>   "Set property PROP to FORM of commands CMDS."
>   (declare (speed 2))
>   (dolist (cmd cmds)
>     (cond
>      ((and (boundp cmd) (consp (symbol-value cmd)))
>       (setf (plist-get (symbol-value cmd) prop) (eval form 'lexical)))
>      ((functionp cmd)
>       (setf (plist-get (alist-get cmd consult--customize-alist) prop) form))
>      (t (user-error "%s is neither a Command command nor a source" cmd))))
>   nil)
> ```
>
> With this setup I can not reproduce the crash. Is the method wrong? How?
> Can you explain this to me?
>
> Thank you

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




This bug report was last modified 1 year and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.