From: Chong Yidong <cyd@stupidchicken.com>
To: Sven Joachim <svenjoac@gmx.de>
Cc: 5365@debbugs.gnu.org
Subject: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396)
Date: Wed, 13 Jan 2010 12:27:53 -0500 [thread overview]
Message-ID: <87pr5d7w4m.fsf@stupidchicken.com> (raw)
In-Reply-To: <87aawigcam.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:11:29 -0500")
Chong Yidong <cyd@stupidchicken.com> writes:
> Even if that's the case, I'm not sure why Vlocal_function_key_map is
> getting garbage-collected, tho.
OK, I see one place where this could happen. In xterm.c:10207:
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
...
if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
{
char *vendor = ServerVendor (dpy);
/* Temporarily hide the partially initialized terminal */
terminal_list = terminal->next_terminal;
UNBLOCK_INPUT;
terminal->kboard->Vsystem_key_alist
= call1 (Qvendor_specific_keysyms,
vendor ? build_string (vendor) : empty_unibyte_string);
BLOCK_INPUT;
...
}
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
It's possible that garbage-collection occurs during the call1, when the
keyboard has not yet been put on the all_kboards linked list. In that
case, it will not be protected from garbage collection.
Sven, does the following patch fix the bug?
*** src/xterm.c 2010-01-09 04:16:32 +0000
--- src/xterm.c 2010-01-13 17:27:27 +0000
***************
*** 10210,10215 ****
--- 10210,10216 ----
if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
{
char *vendor = ServerVendor (dpy);
+ int count = inhibit_garbage_collection ();
/* Temporarily hide the partially initialized terminal */
terminal_list = terminal->next_terminal;
UNBLOCK_INPUT;
***************
*** 10217,10222 ****
--- 10218,10224 ----
= call1 (Qvendor_specific_keysyms,
vendor ? build_string (vendor) : empty_unibyte_string);
BLOCK_INPUT;
+ unbind_to (count, Qnil);
terminal->next_terminal = terminal_list;
terminal_list = terminal;
}
next prev parent reply other threads:[~2010-01-13 17:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 14:58 bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Sven Joachim
2010-01-13 10:03 ` Sven Joachim
2010-01-13 15:17 ` Stefan Monnier
2010-01-13 17:11 ` Chong Yidong
2010-01-13 17:27 ` Chong Yidong [this message]
2010-01-13 18:57 ` Stefan Monnier
2010-01-13 20:53 ` Chong Yidong
2010-01-14 4:21 ` Stefan Monnier
2010-01-15 16:27 ` Chong Yidong
2010-01-15 17:52 ` Stefan Monnier
2010-01-13 19:13 ` Sven Joachim
2010-01-13 18:46 ` Sven Joachim
-- strict thread matches above, loose matches on Subject: below --
2010-01-12 19:08 Chong Yidong
2010-01-12 19:39 ` Sven Joachim
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=87pr5d7w4m.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=5365@debbugs.gnu.org \
--cc=svenjoac@gmx.de \
/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.