From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer' Date: Mon, 08 Jan 2024 05:35:16 -0500 Message-ID: References: <838r5qib7l.fsf@gnu.org> <83plz1ggua.fsf@gnu.org> <8334vwgezh.fsf@gnu.org> <83msu2fzvc.fsf@gnu.org> <834jg9fk2j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14295"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 67900@debbugs.gnu.org, Eli Zaretskii To: Chang Xiaoduan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 08 11:36:18 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rMmzS-0003S7-OM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jan 2024 11:36:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMmz9-0000qE-C0; Mon, 08 Jan 2024 05:35:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMmz7-0000oh-OC for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 05:35:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMmz6-0004mS-8Y for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 05:35:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMmzC-0004KI-C3 for bug-gnu-emacs@gnu.org; Mon, 08 Jan 2024 05:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jan 2024 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67900 X-GNU-PR-Package: emacs Original-Received: via spool by 67900-submit@debbugs.gnu.org id=B67900.170471013516590 (code B ref 67900); Mon, 08 Jan 2024 10:36:02 +0000 Original-Received: (at 67900) by debbugs.gnu.org; 8 Jan 2024 10:35:35 +0000 Original-Received: from localhost ([127.0.0.1]:35285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMmyl-0004JW-Ge for submit@debbugs.gnu.org; Mon, 08 Jan 2024 05:35:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMmyj-0004JI-FH for 67900@debbugs.gnu.org; Mon, 08 Jan 2024 05:35:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMmyU-0003wB-AJ; Mon, 08 Jan 2024 05:35:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=FX1+JU7RUeV0ABNaChLHVci3hpGG5AwLipnNToETtCg=; b=feCBpS2pTjMieRQr3yEN Qmer++smP//RVjMtQoOdqR7JcZL82xVip6jDo7nHXSlO1sA8zPmvKh2OKuDDNkFEvlxf1TcCNVFZ/ +6qQPbp9k9ZC2weOpHYd9NOKqzb7zSW03dIEWGP8ar0bHEoSeZZzXnSS38jIaCnnzY7ea0kQ9WW8J FZUyn7st5nSMSBdnWuqn4oBZpjpcZZPYIfjt4K1L5Mx5TvSL6L7KkI6tiQDpOoG3bQS1DNABG1LC5 +38HQcdLLLIlk0Hk/62mh6s9Uy+1oY0cGHQjWm8A3aKjEfK9GN/2SC6PDssZgDSk4QtlF8L/G2W4Z 5buBOApSSmNEdA==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rMmyS-0000vZ-Hk; Mon, 08 Jan 2024 05:35:16 -0500 In-Reply-To: (Chang Xiaoduan's message of "Mon, 08 Jan 2024 11:28:26 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277544 Archived-At: Chang Xiaoduan writes: > Hello Andrea, > > After some further test, I have found that the crash is reproducible > when the declare form is absent from the function definition inside the > macro definition. You mean with the whole compilation unit is compiled at speed 2? > #+begin_src emacs-lisp > (defmacro consult--define-state (type) > "Define state function for TYPE." > (declare (speed 1)) > `(defun ,(intern (format "consult--%s-state" type)) () > ,(format "State function for %ss with preview. > The result can be passed as :state argument to `consult--read'." type) > (declare (speed 1)) ;; If absent, crash is reproducible > (consult--state-with-return (,(intern (format "consult--%s-preview" type))) > #',(intern (format "consult--%s-action" type))))) > #+end_src > > Even if I use `emacs-lisp-macroexpand' to expand all instances of this > macro, and add declare form to these functions, missing the declare form > in the function definition inside the macro definition still triggers > the crash. Mmmh not sure I understand, if you macro expanded all the instances of this macro how can the macro matter given it's never called? > In fact, if the functions generated from the macro expansion > contains the declare form seems has nothing to do with the crash. Do you > have any idea why this is happening and how it may be fixed? I think we have to really understand what's happening here and if what you've observed is reproducible cause it does not make much sense to me ATM. Thanks for your investigation Andrea