From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50376: 28.0.50; Counsel M-x completion segfaults in command-modes Date: Sat, 04 Sep 2021 20:42:41 +0300 Message-ID: <83lf4cutim.fsf@gnu.org> References: <87wnnww94f.fsf@tcd.ie> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15056"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50376@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 04 19:43:20 2021 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 1mMZhI-0003ik-Uw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Sep 2021 19:43:20 +0200 Original-Received: from localhost ([::1]:53686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMZhH-0000HV-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Sep 2021 13:43:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMZh1-0000HL-Qx for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 13:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMZh0-0005LZ-I8 for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 13:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMZh0-0002pn-9y for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 13:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Sep 2021 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50376 X-GNU-PR-Package: emacs Original-Received: via spool by 50376-submit@debbugs.gnu.org id=B50376.163077736910876 (code B ref 50376); Sat, 04 Sep 2021 17:43:02 +0000 Original-Received: (at 50376) by debbugs.gnu.org; 4 Sep 2021 17:42:49 +0000 Original-Received: from localhost ([127.0.0.1]:48536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMZgn-0002pM-IR for submit@debbugs.gnu.org; Sat, 04 Sep 2021 13:42:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMZgl-0002p6-No for 50376@debbugs.gnu.org; Sat, 04 Sep 2021 13:42:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMZgg-00055w-0q; Sat, 04 Sep 2021 13:42:42 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2331 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMZgc-0003lJ-PE; Sat, 04 Sep 2021 13:42:41 -0400 In-Reply-To: <87wnnww94f.fsf@tcd.ie> (bug-gnu-emacs@gnu.org) 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" Xref: news.gmane.io gmane.emacs.bugs:213428 Archived-At: > Date: Sat, 04 Sep 2021 18:20:16 +0100 > From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > * src/data.c (Fcommand_modes): Check that bytecode object is > interactive before accessing its interactive spec to avoid > segfaulting. > --- > src/data.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/data.c b/src/data.c > index ffca7e7535..27b642df28 100644 > --- a/src/data.c > +++ b/src/data.c > @@ -1045,6 +1045,8 @@ DEFUN ("command-modes", Fcommand_modes, Scommand_modes, 1, 1, 0, > > if (COMPILEDP (fun)) > { > + if (PVSIZE (fun) <= COMPILED_INTERACTIVE) > + return Qnil; > Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE); > if (VECTORP (form)) > /* New form -- the second element is the command modes. */ LGTM, thanks.