GNU bug report logs - #3474
23.0.94; Emacs.app crashes during typing (with patch)

Previous Next

Package: emacs;

Reported by: Wolfgang Lux <wolfgang.lux <at> gmail.com>

Date: Fri, 5 Jun 2009 12:05:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3474 in the body.
You can then email your comments to 3474 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3474; Package emacs. (Fri, 05 Jun 2009 12:05:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wolfgang Lux <wolfgang.lux <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 05 Jun 2009 12:05:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Wolfgang Lux <wolfgang.lux <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.94; Emacs.app crashes during typing (with patch)
Date: Fri, 5 Jun 2009 13:57:31 +0200
[Message part 1 (text/plain, inline)]
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 <at> 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


[keyboard.patch (application/octet-stream, attachment)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3474; Package emacs. (Sun, 07 Jun 2009 21:55:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 07 Jun 2009 21:55:05 GMT) Full text and rfc822 format available.

Message #10 received at 3474 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Adrian Robert  <Adrian.B.Robert <at> gmail.com>
Cc: 3474 <at> debbugs.gnu.org
Subject: Re: 23.0.94; Emacs.app crashes during typing (with patch)
Date: Sun, 07 Jun 2009 17:49:29 -0400
Adrian, could you review this patch?


Wolfgang Lux <wolfgang.lux <at> gmail.com> 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
 



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3474; Package emacs. (Mon, 08 Jun 2009 08:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adrian Robert <adrian.b.robert <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 08 Jun 2009 08:30:03 GMT) Full text and rfc822 format available.

Message #15 received at 3474 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 3474 <at> debbugs.gnu.org
Subject: Re: 23.0.94; Emacs.app crashes during typing (with patch)
Date: Mon, 8 Jun 2009 15:28:11 +0700
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 <wolfgang.lux <at> gmail.com> 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
>




Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Mon, 08 Jun 2009 15:00:04 GMT) Full text and rfc822 format available.

Notification sent to Wolfgang Lux <wolfgang.lux <at> gmail.com>:
bug acknowledged by developer. (Mon, 08 Jun 2009 15:00:05 GMT) Full text and rfc822 format available.

Message #20 received at 3474-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Adrian Robert <adrian.b.robert <at> gmail.com>
Cc: 3474-done <at> debbugs.gnu.org
Subject: Re: 23.0.94; Emacs.app crashes during typing (with patch)
Date: Mon, 08 Jun 2009 10:52:51 -0400
Adrian Robert <adrian.b.robert <at> gmail.com> writes:

>> 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.

Thanks.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 07 Jul 2009 14:24:19 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.