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#3474: 23.0.94; Emacs.app crashes during typing (with patch) Date: Sun, 07 Jun 2009 17:49:29 -0400 Message-ID: <87vdn7ogt2.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 3474@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244411857 7312 80.91.229.12 (7 Jun 2009 21:57:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2009 21:57:37 +0000 (UTC) Cc: 3474@emacsbugs.donarmstrong.com To: Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 07 23:57:33 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 1MDQMu-0000X5-1U for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jun 2009 23:57:32 +0200 Original-Received: from localhost ([127.0.0.1]:55734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDQMt-0002rF-41 for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jun 2009 17:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDQMp-0002qv-4e for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2009 17:57:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDQMk-0002qM-Ge for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2009 17:57:26 -0400 Original-Received: from [199.232.76.173] (port=59142 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDQMk-0002qC-4u for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2009 17:57:22 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44690) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MDQMj-0004JJ-FQ for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2009 17:57: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 n57LvJ6T005927; Sun, 7 Jun 2009 14:57:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n57Lt5Pa005336; Sun, 7 Jun 2009 14:55:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Jun 2009 21:55:04 +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.12444113704487 (code B ref 3474); Sun, 07 Jun 2009 21:55:04 +0000 Original-Received: (at 3474) by emacsbugs.donarmstrong.com; 7 Jun 2009 21:49:30 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n57LnQtp004479 for <3474@emacsbugs.donarmstrong.com>; Sun, 7 Jun 2009 14:49:27 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id E5E0757E246; Sun, 7 Jun 2009 17:49:29 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 07 Jun 2009 17:57: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:28542 Archived-At: Adrian, could you review this patch? 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