GNU bug report logs - #50376
28.0.50; Counsel M-x completion segfaults in command-modes

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Sat, 4 Sep 2021 17:21:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 50376 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 50376 <at> debbugs.gnu.org
Subject: Re: bug#50376: 28.0.50;
 Counsel M-x completion segfaults in command-modes
Date: Sat, 04 Sep 2021 20:42:41 +0300
> 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" <bug-gnu-emacs <at> gnu.org>
> 
> * 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.




This bug report was last modified 3 years and 264 days ago.

Previous Next


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