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: Fri, 29 Dec 2023 13:37:23 -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="25902"; 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 Fri Dec 29 19:38:35 2023 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 1rJHkg-0006aW-8O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Dec 2023 19:38:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJHkT-0005f7-9g; Fri, 29 Dec 2023 13:38:21 -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 1rJHkA-0005dt-FV for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 13:38:06 -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 1rJHkA-0002Yy-05 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 13:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJHk9-0007Cl-O8 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 13:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Dec 2023 18:38:01 +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.170387505627660 (code B ref 67900); Fri, 29 Dec 2023 18:38:01 +0000 Original-Received: (at 67900) by debbugs.gnu.org; 29 Dec 2023 18:37:36 +0000 Original-Received: from localhost ([127.0.0.1]:42214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJHjk-0007C4-7b for submit@debbugs.gnu.org; Fri, 29 Dec 2023 13:37:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJHjh-0007Bm-5i for 67900@debbugs.gnu.org; Fri, 29 Dec 2023 13:37: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 1rJHjX-0001z1-VK; Fri, 29 Dec 2023 13:37:23 -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=eemGfl+krr7gVVqzVvNhQw6BKvgE4Lf2ng4Ze6V8w2Q=; b=Uwf6FjOIu+bNR+zMUeur T5M6wIJUgrrWIBeYkXgi+E8a8f67C8Dd2PZhAmy6+ja1Khz1IEko7g5oiBe3+20uynnElX5bOFuzl jwhXMAbdmjWo3bn9NuE4KVzW2wV0X2AgV3T1Oa9ChKONysciyTYpZ2jge/dNg564KUrA6IWZuv5Wn GNNiS7aQTse2PWlgypCU2x5gXMWHCf99NPHriO9PLZ9eWcDo/kGec94vIYApnoxJNZty1mhoBxETv OeiancDWIoexwuCndTUojFxoA0kUZQ0UFcqwHIff2FV+UCC0F6daOVmU3E7OiQ1FUDymPMs1zZBbg KYFVx0M+couohw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rJHjX-0002b2-6p; Fri, 29 Dec 2023 13:37:23 -0500 In-Reply-To: (Chang Xiaoduan's message of "Thu, 28 Dec 2023 19:44:40 +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:277031 Archived-At: Chang Xiaoduan writes: > Andrea Corallo writes: > >> Eli Zaretskii 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