]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid rare crashes due to clobbering of input events
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Aug 2024 18:35:08 +0000 (21:35 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 20 Aug 2024 14:11:05 +0000 (16:11 +0200)
* src/keyboard.c (read_char): Declare C 'volatile', to prevent
clobbering it by setjmp/longjmp.  Do not merge to master.
(Bug#71744)

(cherry picked from commit 9e7c2d3816ec3e1247b1bd3cfcafc60a84b0f5ec)

src/keyboard.c

index 909c97774a454872be94827a50b7ca8bcd7bc3fa..a6bd113f19eb6d115f5358e5585f13c4020c10aa 100644 (file)
@@ -2517,7 +2517,7 @@ read_char (int commandflag, Lisp_Object map,
           Lisp_Object prev_event,
           bool *used_mouse_menu, struct timespec *end_time)
 {
-  Lisp_Object c;
+  volatile Lisp_Object c;
   sys_jmp_buf local_getcjmp;
   sys_jmp_buf save_jump;
   Lisp_Object tem, save;