* bug#3474: 23.0.94; Emacs.app crashes during typing (with patch)
@ 2009-06-07 21:49 Chong Yidong
2009-06-08 8:28 ` Adrian Robert
0 siblings, 1 reply; 3+ messages in thread
From: Chong Yidong @ 2009-06-07 21:49 UTC (permalink / raw
To: Adrian Robert; +Cc: 3474
Adrian, could you review this patch?
Wolfgang Lux <wolfgang.lux@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#3474: 23.0.94; Emacs.app crashes during typing (with patch)
2009-06-07 21:49 bug#3474: 23.0.94; Emacs.app crashes during typing (with patch) Chong Yidong
@ 2009-06-08 8:28 ` Adrian Robert
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Robert @ 2009-06-08 8:28 UTC (permalink / raw
To: Chong Yidong; +Cc: 3474
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@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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#3474: 23.0.94; Emacs.app crashes during typing (with patch)
@ 2009-06-05 11:57 Wolfgang Lux
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Lux @ 2009-06-05 11:57 UTC (permalink / raw
To: emacs-pretest-bug
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
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
[-- Attachment #2: keyboard.patch --]
[-- Type: application/octet-stream, Size: 604 bytes --]
--- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-08 8:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-07 21:49 bug#3474: 23.0.94; Emacs.app crashes during typing (with patch) Chong Yidong
2009-06-08 8:28 ` Adrian Robert
-- strict thread matches above, loose matches on Subject: below --
2009-06-05 11:57 Wolfgang Lux
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.