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: Fri, 15 Jan 2010 11:27:05 -0500 Message-ID: <873a27z63q.fsf@stupidchicken.com> References: <87skab2ww3.fsf@turtle.gmx.de> <87ockyqq2c.fsf@turtle.gmx.de> <87aawigcam.fsf@stupidchicken.com> <87pr5d7w4m.fsf@stupidchicken.com> <87pr5d9163.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 1263573291 4612 80.91.229.12 (15 Jan 2010 16:34:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jan 2010 16:34:51 +0000 (UTC) Cc: Sven Joachim , 5365@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 15 17:34:43 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 1NVp8E-0002QG-HP for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jan 2010 17:34:42 +0100 Original-Received: from localhost ([127.0.0.1]:51753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVp8F-0007So-7u for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jan 2010 11:34:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVp3H-0005mf-PC for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2010 11:29:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVp3C-0005m2-3k for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2010 11:29:34 -0500 Original-Received: from [199.232.76.173] (port=52208 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVp3B-0005lz-RR for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2010 11:29:29 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:29164) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVp3B-0003KS-FP for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2010 11:29:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVp3A-0003qy-Ok for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2010 11:29:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NVp1m-0003Wn-84; Fri, 15 Jan 2010 11:28:02 -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: Fri, 15 Jan 2010 16:28:02 +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.126357283213516 (code B ref 5365); Fri, 15 Jan 2010 16:28:02 +0000 Original-Received: (at 5365) by debbugs.gnu.org; 15 Jan 2010 16:27:12 +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 1NVp0x-0003Vx-RI for submit@debbugs.gnu.org; Fri, 15 Jan 2010 11:27:12 -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 1NVp0w-0003Vr-0U for 5365@debbugs.gnu.org; Fri, 15 Jan 2010 11:27:10 -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 o0FGR5IJ010576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 15 Jan 2010 11:27:05 -0500 Original-Received: by furry (Postfix, from userid 1000) id 131D6C05D; Fri, 15 Jan 2010 09:27:05 -0700 (MST) In-Reply-To: (Stefan Monnier's message of "Wed, 13 Jan 2010 23:21:00 -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.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.3 (--) Resent-Date: Fri, 15 Jan 2010 11:28:02 -0500 X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:34361 Archived-At: Stefan Monnier writes: >>> Indeed, that looks risky. Why don't we add this new kboard to the >>> all_kboards list before calling Qvendor_specific_keysyms? >> We'd still have to protect the terminal object. > > Why? It's a normal Lisp object, so it should be protected by the usual > GCPRO or stack marking, no? > [ Oddly enough, mark_terminal doesn't traverse the terminal's kboard. ] But the terminal object is removed from the terminal list before the call1 (this was before my latest patch): if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound)) { char *vendor = ServerVendor (dpy); terminal_list = terminal->next_terminal; UNBLOCK_INPUT; terminal->kboard->Vsystem_key_alist = call1 (Qvendor_specific_keysyms, vendor ? build_string (vendor) : empty_unibyte_string); ... This means that mark_terminal won't be able to reach the newly-allocated terminal object, so its contents could get gc'ed. I haven't checked that there is anything in the terminal object that is actually in danger of being gc'ed, but given some could hypothetically be added in the future, it seems better to pre-emptively turn off gc during this function call.