From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.bugs Subject: bug#3474: 23.0.94; Emacs.app crashes during typing (with patch) Date: Mon, 8 Jun 2009 15:28:11 +0700 Message-ID: References: <87vdn7ogt2.fsf@cyd.mit.edu> Reply-To: Adrian Robert , 3474@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1244450261 16417 80.91.229.12 (8 Jun 2009 08:37:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2009 08:37:41 +0000 (UTC) Cc: 3474@emacsbugs.donarmstrong.com To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 08 10:37:37 2009 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 1MDaMG-0002jl-W8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 10:37:33 +0200 Original-Received: from localhost ([127.0.0.1]:46999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDaMG-0003kp-Gv for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 04:37:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDaMB-0003ke-48 for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 04:37:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDaM6-0003kE-7W for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 04:37:26 -0400 Original-Received: from [199.232.76.173] (port=36464 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDaM6-0003kB-1w for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 04:37:22 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55575) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MDaM5-0005UL-ID for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 04:37:21 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n588bJj7012002; Mon, 8 Jun 2009 01:37:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n588U3D5010576; Mon, 8 Jun 2009 01:30:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Adrian Robert Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 08 Jun 2009 08:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3474 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3474-submit@emacsbugs.donarmstrong.com id=B3474.124444966410455 (code B ref 3474); Mon, 08 Jun 2009 08:30:03 +0000 Original-Received: (at 3474) by emacsbugs.donarmstrong.com; 8 Jun 2009 08:27:44 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-pz0-f191.google.com (mail-pz0-f191.google.com [209.85.222.191]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n588RdEX010437 for <3474@emacsbugs.donarmstrong.com>; Mon, 8 Jun 2009 01:27:41 -0700 Original-Received: by pzk29 with SMTP id 29so147019pzk.19 for <3474@emacsbugs.donarmstrong.com>; Mon, 08 Jun 2009 01:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=soNYblwUlg18zGkQ0W+JdIVm86yRakVII7cMJvTtf2k=; b=cqd24vre12XNFf2Ua8/BniMXN7hqNqvavWYK/kA8tE3tvCB51V2o3xqrArDeESnNCQ uV+KbXFFmyOalWgJD9cDSH/BJsCjfhBIlNTWVnU7W0qboCJm3XJNxxU6/n6Z7/7uHsIr M3xfMGTxZu2cgNKhCxZj2DteuOtblReT7qdB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=ugNgDCSk3+QWeWPbWxF72QdvdLLZVmTwqegf8OnppG9YmN6Om1eeIO6EElnZOBSBWt DJ79pWWn8QE3fD1LeH7X3Ez0GnBBgGlQrj359dXkQPbm5k5kWoVhajq8hx/a23C82csL k69foUWX1WaNZu0WvGhaHOLbU3PXYMUnjKZow= Original-Received: by 10.142.49.4 with SMTP id w4mr2109391wfw.174.1244449653885; Mon, 08 Jun 2009 01:27:33 -0700 (PDT) Original-Received: from ?192.168.1.8? (118.172.29.132.adsl.dynamic.totbb.net [118.172.29.132]) by mx.google.com with ESMTPS id 24sm8465423wfc.17.2009.06.08.01.27.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Jun 2009 01:27:33 -0700 (PDT) In-Reply-To: <87vdn7ogt2.fsf@cyd.mit.edu> X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 08 Jun 2009 04:37:26 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:28550 Archived-At: On Jun 8, 2009, at 4:49 AM, Chong Yidong wrote: > Adrian, could you review this patch? It looks OK to me, I'm checking it in. Other parts of that function do similar null checks and don't behave specially if they can't set it. -Adrian > > > Wolfgang Lux wrote: > >> I've encountered a few crashes in Emacs.app, which happened while >> typing when Emacs was a bit busy. It turns out that these crashes >> were due to an omitted null-pointer check at line 4165 of keyboard.c >> in function kbd_buffer_get_event(). The attached patch fixes this >> problem along with a second omitted null-pointer check in line 4323 >> of the same function. > > --- src/keyboard.c.~1.1005.~ 2009-05-28 17:08:04.000000000 +0200 > +++ src/keyboard.c 2009-06-02 13:39:39.000000000 +0200 > @@ -4162,7 +4162,8 @@ > else > obj = Fcons (intern ("ns-unput-working-text"), Qnil); > kbd_fetch_ptr = event + 1; > - *used_mouse_menu = 1; > + if (used_mouse_menu) > + *used_mouse_menu = 1; > } > #endif > > @@ -4319,7 +4320,8 @@ > #endif > #ifdef HAVE_NS > /* certain system events are non-key events */ > - if (event->kind == NS_NONKEY_EVENT) > + if (used_mouse_menu > + && event->kind == NS_NONKEY_EVENT) > *used_mouse_menu = 1; > #endif >