From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#5365: 23.1.91; Wrong type argument: keymapp, ("DEAD" . 35215396) Date: Wed, 13 Jan 2010 12:27:53 -0500 Message-ID: <87pr5d7w4m.fsf@stupidchicken.com> References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263404972 14028 80.91.229.12 (13 Jan 2010 17:49:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2010 17:49:32 +0000 (UTC) Cc: 5365@debbugs.gnu.org To: Sven Joachim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 13 18:49:25 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NV7LQ-0002GC-K1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 18:49:24 +0100 Original-Received: from localhost ([127.0.0.1]:39199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV7LQ-00022w-TP for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 12:49:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV7LL-00021f-HY for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 12:49:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV7LG-0001zf-LB for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 12:49:18 -0500 Original-Received: from [199.232.76.173] (port=55966 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV7LG-0001zb-CN for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 12:49:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38694) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NV7LF-0001NL-V9 for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 12:49:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NV70j-00050X-TT; Wed, 13 Jan 2010 12:28:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jan 2010 17:28:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5365 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5365-submit@debbugs.gnu.org id=B5365.126340368019243 (code B ref 5365); Wed, 13 Jan 2010 17:28:01 +0000 Original-Received: (at 5365) by debbugs.gnu.org; 13 Jan 2010 17:28:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV70i-00050K-Fj for submit@debbugs.gnu.org; Wed, 13 Jan 2010 12:28:00 -0500 Original-Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV70g-00050C-GQ for 5365@debbugs.gnu.org; Wed, 13 Jan 2010 12:27:58 -0500 Original-Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0DHRsEd015820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Jan 2010 12:27:54 -0500 Original-Received: by furry (Postfix, from userid 1000) id E3489C05D; Wed, 13 Jan 2010 10:27:53 -0700 (MST) In-Reply-To: <87aawigcam.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 13 Jan 2010 12:11:29 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.1 (--) Resent-Date: Wed, 13 Jan 2010 12:28:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34282 Archived-At: Chong Yidong 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; }