From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Lux Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3474: 23.0.94; Emacs.app crashes during typing (with patch) Date: Fri, 5 Jun 2009 13:57:31 +0200 Message-ID: <416FFC32-AFAF-4A82-97AD-057D332C37C2@gmail.com> Reply-To: Wolfgang Lux , 3474@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: multipart/mixed; boundary=Apple-Mail-2--392120180 X-Trace: ger.gmane.org 1244204262 8920 80.91.229.12 (5 Jun 2009 12:17:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2009 12:17:42 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 05 14:17:39 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 1MCYMZ-0006mS-Vb for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2009 14:17:36 +0200 Original-Received: from localhost ([127.0.0.1]:34574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCYMZ-0006MJ-An for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2009 08:17:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCYMT-0006Ka-IV for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 08:17:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCYMO-0006GV-Io for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 08:17:28 -0400 Original-Received: from [199.232.76.173] (port=45393 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCYMO-0006GJ-8e for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 08:17:24 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37242) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MCYMN-0005WA-Nv for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 08:17:24 -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 n55CHIrR020037; Fri, 5 Jun 2009 05:17:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n55C54n5017827; Fri, 5 Jun 2009 05:05:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Wolfgang Lux Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Jun 2009 12:05:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3474 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124420307616749 (code B ref -1); Fri, 05 Jun 2009 12:05:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 5 Jun 2009 11:57:56 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n55BvpHv016744 for ; Fri, 5 Jun 2009 04:57:53 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:52301 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MCY3T-0004vD-3W for emacs-pretest-bug@gnu.org; Fri, 05 Jun 2009 07:57:51 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MCY3S-0001kZ-Ev for emacs-pretest-bug@gnu.org; Fri, 05 Jun 2009 07:57:50 -0400 Original-Received: from mail-bw0-f211.google.com ([209.85.218.211]:63637) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCY3S-0001kH-3M for emacs-pretest-bug@gnu.org; Fri, 05 Jun 2009 07:57:50 -0400 Original-Received: by bwz7 with SMTP id 7so83269bwz.42 for ; Fri, 05 Jun 2009 04:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:to:message-id :content-type:from:subject:date:x-mailer; bh=1BpKNqb3B4kA35jLMJbICa0yRsnYdQc0Ai57jCZgb4I=; b=F6TbcQoWYlEtS0ZIRD3yrqQJumq6WyE/mC4/93Yf9yTmUQpfe1g8g601P9Gn1vczT7 /zwAW89pxWTA0Fx1hJ8fEJSvoe1XUrJPGOdl3wIMz0sUupHPI/0qCW8xOblTQXktIu3h nUtBjTWQmEZU6s4fUs21XBD+FTq9ROL3uSwZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=A58UUd0F013Fakz1l0qx8xuQFtnOy2nb2rai7YuNoaO8g7rogFDLZoLFAHKpDlEiMF 4u7XxDxe8pGA43FVmvoOO0GkPm//igIYouLkU1j/i5xcQv1covD6yrsmLI72fULGe/rm axRqLr4zWftWg+Tp0aUhZlxLdR4YsP92Fr/yU= Original-Received: by 10.103.213.19 with SMTP id p19mr1088780muq.91.1244203067686; Fri, 05 Jun 2009 04:57:47 -0700 (PDT) Original-Received: from ?212.144.126.125? (dialin-212-144-126-125.pools.arcor-ip.net [212.144.126.125]) by mx.google.com with ESMTPS id 14sm42198muo.3.2009.06.05.04.57.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 04:57:47 -0700 (PDT) X-Mailer: Apple Mail (2.753.1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 05 Jun 2009 08:17:28 -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:28504 gmane.emacs.pretest.bugs:24568 Archived-At: --Apple-Mail-2--392120180 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: 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. Wolfgang --Apple-Mail-2--392120180 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=keyboard.patch Content-Disposition: attachment; filename=keyboard.patch --- 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 --Apple-Mail-2--392120180--