GNU bug report logs - #55269
29.0.50; Infinite recursion causes segmentation fault

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Thu, 5 May 2022 09:55:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philip Kaludercic <philipk <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55269 <at> debbugs.gnu.org
Subject: bug#55269: 29.0.50; Infinite recursion causes segmentation fault
Date: Thu, 05 May 2022 11:14:31 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>> #12 0x0000000000686c42 in print_error_message (data=0x1fc6273, stream=0x7ffff4881285, context=0x0, caller=0x0) at print.c:957
>> #13 0x0000000000686978 in Ferror_message_string (obj=0x1fc6273) at print.c:902
>> #14 0x00000000006569f5 in skip_debugger (conditions=0x7ffff44534b3, data=0x1fc6273) at eval.c:1888
>
> Hm...  so the backtrace here seems to say that skip_debugger (which is
> supposed to be a predicate) is itself bugging out (i.e., the
> Ferror_message_string is erroring)?
>
> Hm...  Oh, it's coming from here?
>
> void
> print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
> 		     Lisp_Object caller)
> [...]
>       if (!NILP (Ffboundp (Qsubstitute_command_keys)))
> 	errmsg = call1 (Qsubstitute_command_keys, errmsg);
>
> I think the fix here would be to ensure that that call never signals an
> error (i.e., slap a condition-case around that call1).  I.e., could you
> try this patch and see whether it fixes the problem?

I can confirm this solves the problem.  Thanks!

> diff --git a/src/print.c b/src/print.c
> index 54d8bdfa3d..5255ea3632 100644
> --- a/src/print.c
> +++ b/src/print.c
> @@ -954,7 +954,11 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
>        errmsg = Fget (errname, Qerror_message);
>        /* During loadup 'substitute-command-keys' might not be available.  */
>        if (!NILP (Ffboundp (Qsubstitute_command_keys)))
> -	errmsg = call1 (Qsubstitute_command_keys, errmsg);
> +	{
> +	  Lisp_Object subs = safe_call1 (Qsubstitute_command_keys, errmsg);
> +	  if (!NILP (subs))
> +	    errmsg = subs;
> +	}
>  
>        file_error = Fmemq (Qfile_error, error_conditions);
>      }




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

Previous Next


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