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: Chang Xiaoduan <drcxd <at> sina.com>
To: Andrea Corallo <acorallo <at> gnu.org>
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: Thu, 28 Dec 2023 19:44:40 +0800
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




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.