From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: yuri@tenuki.org, 28279@debbugs.gnu.org
Subject: bug#28279: 25.2; repeatable crash when hitting C-g twice
Date: Wed, 30 Aug 2017 19:46:36 +0300 [thread overview]
Message-ID: <8360d52ec3.fsf@gnu.org> (raw)
In-Reply-To: <92efrub1vf.fsf@fencepost.gnu.org> (message from Glenn Morris on Tue, 29 Aug 2017 15:38:44 -0400)
> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 29 Aug 2017 15:38:44 -0400
> Cc: 28279@debbugs.gnu.org
>
> Eric Hoffman wrote:
>
> > 0x4ad7a3 <emacs_abort+0x13> at /usr/home/yuri/emacs-25.2/src/emacs-25.2.1
> > 0x50c474 <Fsignal+0x4b4> at /usr/home/yuri/emacs-25.2/src/emacs-25.2.1
> > 0x512cf5 <Fassq+0x15> at /usr/home/yuri/emacs-25.2/src/emacs-25.2.1
> > 0x48cfbe <Fterminal_parameter+0x7e> at /usr/home/yuri/emacs-25.2/src/emacs-25.2.1
> > 0x48c1e7 <tty_send_additional_strings+0x17> at /usr/home/yuri/emacs-25.2/src/emacs-25.2.1
>
> This appears to be https://debbugs.gnu.org/17406
Does the below look reasonable for a fix?
diff --git a/src/term.c b/src/term.c
index 87a4126..5042abf 100644
--- a/src/term.c
+++ b/src/term.c
@@ -156,13 +156,17 @@ static void
tty_send_additional_strings (struct terminal *terminal, Lisp_Object sym)
{
Lisp_Object lisp_terminal;
- Lisp_Object extra_codes;
struct tty_display_info *tty = terminal->display_info.tty;
XSETTERMINAL (lisp_terminal, terminal);
- for (extra_codes = Fterminal_parameter (lisp_terminal, sym);
- CONSP (extra_codes);
- extra_codes = XCDR (extra_codes))
+ /* We use CDR_SAFE and assq_no_quit to avoid any form of quitting or
+ signaling an error, since this function can run as part of the
+ "emergency escape" procedure invoked in the middle of GC, where
+ quitting means we crash. */
+ Lisp_Object extra_codes =
+ CDR_SAFE (assq_no_quit (sym,
+ decode_live_terminal (lisp_terminal)->param_alist));
+ for ( ; CONSP (extra_codes); extra_codes = XCDR (extra_codes))
{
Lisp_Object string = XCAR (extra_codes);
if (STRINGP (string))
next prev parent reply other threads:[~2017-08-30 16:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 18:20 bug#28279: 25.2; repeatable crash when hitting C-g twice Eric Hoffman
2017-08-29 18:47 ` Eli Zaretskii
2017-08-29 19:38 ` Glenn Morris
2017-08-30 16:46 ` Eli Zaretskii [this message]
2017-08-31 16:48 ` Glenn Morris
2017-08-31 17:35 ` Eli Zaretskii
2017-08-29 21:32 ` Eric Hoffman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8360d52ec3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=28279@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=yuri@tenuki.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.