From: Philip Kaludercic <philipk@posteo.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 55269@debbugs.gnu.org
Subject: bug#55269: 29.0.50; Infinite recursion causes segmentation fault
Date: Thu, 05 May 2022 11:14:31 +0000 [thread overview]
Message-ID: <877d70dyeg.fsf@posteo.net> (raw)
In-Reply-To: <871qx8uu39.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 05 May 2022 12:55:38 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Philip Kaludercic <philipk@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);
> }
next prev parent reply other threads:[~2022-05-05 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 9:53 bug#55269: 29.0.50; Infinite recursion causes segmentation fault Philip Kaludercic
2022-05-05 10:00 ` Andreas Schwab
2022-05-05 10:42 ` Philip Kaludercic
2022-05-05 10:55 ` Lars Ingebrigtsen
2022-05-05 11:14 ` Philip Kaludercic [this message]
2022-05-05 11:22 ` Lars Ingebrigtsen
2022-05-05 17:08 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d70dyeg.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=55269@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).