From unknown Mon Jun 23 06:00:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20756 <20756@debbugs.gnu.org> To: bug#20756 <20756@debbugs.gnu.org> Subject: Status: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type Reply-To: bug#20756 <20756@debbugs.gnu.org> Date: Mon, 23 Jun 2025 13:00:32 +0000 retitle 20756 25.0.50; struct selection_input_event data might be corrupted= by assignments as another structure type reassign 20756 emacs submitter 20756 YAMAMOTO Mitsuharu severity 20756 normal tag 20756 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 04:13:52 2015 Received: (at submit) by debbugs.gnu.org; 7 Jun 2015 08:13:52 +0000 Received: from localhost ([127.0.0.1]:43694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1ViJ-00014h-DA for submit@debbugs.gnu.org; Sun, 07 Jun 2015 04:13:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60421) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1ViF-00014P-Vc for submit@debbugs.gnu.org; Sun, 07 Jun 2015 04:13:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1Vi9-0001Dv-F6 for submit@debbugs.gnu.org; Sun, 07 Jun 2015 04:13:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Vi9-0001Dn-Bm for submit@debbugs.gnu.org; Sun, 07 Jun 2015 04:13:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Vi7-00005W-VZ for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 04:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1Vi4-0001Bi-Op for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 04:13:39 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Vi4-00019k-8f for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 04:13:36 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 6BA39C0566 for ; Sun, 7 Jun 2015 17:13:31 +0900 (JST) Date: Sun, 07 Jun 2015 17:13:31 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: bug-gnu-emacs@gnu.org Subject: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) On X11, each element of `kbd_buffer' is implicitly used as a union of two structure types: `struct input_event' (in termhooks.h) for general use and `struct selection_input_event' (in xterm.h) for selection events. These types have different layouts, especially with respect to paddings. But elements of `kbd_buffer' are copied via assignments for one structure type, `struct input_event', in several places in keyboard.c. For example, 3685 /* Put an input event back in the head of the event queue. */ 3686 3687 void 3688 kbd_buffer_unget_event (register struct input_event *event) 3689 { 3690 if (kbd_fetch_ptr == kbd_buffer) 3691 kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE; 3692 3693 /* Don't let the very last slot in the buffer become full, */ 3694 if (kbd_fetch_ptr - 1 != kbd_store_ptr) 3695 { 3696 --kbd_fetch_ptr; 3697 *kbd_fetch_ptr = *event; 3698 } 3699 } This is problematic because structure copy via assignments may not preserve the contents of the paddings in general, and they might contain sensitive information for the other structure, `struct selection_input_event'. Actually, I can reproduce the crash with `C-w' on a 64-bit executable compiled with the following version of llvm-gcc for OS X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) The disassembly output below shows that 4 bytes from 12-byte offset are not copied. These correspond to a part of `dpyinfo' member in `struct selection_input_event', and it gets corrupted. _kbd_buffer_unget_event: 00000000000001d0 pushq %rbp 00000000000001d1 movq %rsp, %rbp 00000000000001d4 leaq (%rip), %rax 00000000000001db movq (%rip), %rcx 00000000000001e2 cmpq %rax, %rcx 00000000000001e5 jne 0x1f5 00000000000001e7 leaq 229376(%rip), %rcx 00000000000001ee movq %rcx, (%rip) 00000000000001f5 leaq -56(%rcx), %rax 00000000000001f9 cmpq (%rip), %rax 0000000000000200 je 0x242 0000000000000202 movq %rax, (%rip) 0000000000000209 movl (%rdi), %eax 000000000000020b movl %eax, -56(%rcx) 000000000000020e movl 4(%rdi), %eax 0000000000000211 movl %eax, -52(%rcx) 0000000000000214 movl 8(%rdi), %eax 0000000000000217 movl %eax, -48(%rcx) 000000000000021a movq 16(%rdi), %rax 000000000000021e movq %rax, -40(%rcx) 0000000000000222 movq 24(%rdi), %rax 0000000000000226 movq %rax, -32(%rcx) 000000000000022a movq 32(%rdi), %rax 000000000000022e movq %rax, -24(%rcx) 0000000000000232 movq 40(%rdi), %rax 0000000000000236 movq %rax, -16(%rcx) 000000000000023a movq 48(%rdi), %rax 000000000000023e movq %rax, -8(%rcx) 0000000000000242 popq %rbp 0000000000000243 ret 0000000000000244 nopw (%rax,%rax) 000000000000024a nopw (%rax,%rax) YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp In GNU Emacs 25.0.50.1 (x86_64-apple-darwin11.4.2, GTK+ Version 3.16.3) of 2015-06-07 on yamamoto-no-MacBook-Air.local Windowing system distributor `The X.Org Foundation', version 11.0.11006000 Configured using: `configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include' From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 19:44:37 2015 Received: (at 20756) by debbugs.gnu.org; 23 Jun 2015 23:44:37 +0000 Received: from localhost ([127.0.0.1]:55648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Xro-0000RN-UU for submit@debbugs.gnu.org; Tue, 23 Jun 2015 19:44:37 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56991) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Xrl-0000Qs-Mn; Tue, 23 Jun 2015 19:44:34 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 494B91601A5; Tue, 23 Jun 2015 16:44:27 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gS1BRLxScBjQ; Tue, 23 Jun 2015 16:44:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9DDE71601EA; Tue, 23 Jun 2015 16:44:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TO-R5XRCXf4l; Tue, 23 Jun 2015 16:44:26 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 770411601A5; Tue, 23 Jun 2015 16:44:26 -0700 (PDT) Message-ID: <5589EF5A.6010409@cs.ucla.edu> Date: Tue, 23 Jun 2015 16:44:26 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: YAMAMOTO Mitsuharu Subject: Re: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20756 Cc: 17026@debbugs.gnu.org, 13486@debbugs.gnu.org, 20756@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Thanks for tracking down and diagnosing this bug. I've installed a patch as commit 1552e6737317ea2c85e06600e178114c6b0f9fb2 in emacs master; can you please try it in your environment? It's possible, I suppose, that this fix will affect Bug#13486 and Bug#17026 (merged with Bug#16737, Bug#17101, Bug#17172, Bug#19320, Bug#20283). Ideally those bugs would go away too, though this is a shot in the dark. Anyway, I'll CC: to those bug reports to give their followers a heads-up. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 20:56:38 2015 Received: (at 20756) by debbugs.gnu.org; 24 Jun 2015 00:56:38 +0000 Received: from localhost ([127.0.0.1]:55667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7YzU-00025v-OJ for submit@debbugs.gnu.org; Tue, 23 Jun 2015 20:56:37 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56818) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7YzP-00025M-48; Tue, 23 Jun 2015 20:56:33 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 5268CC0560; Wed, 24 Jun 2015 09:56:25 +0900 (JST) Date: Wed, 24 Jun 2015 09:56:25 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Paul Eggert Subject: Re: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type In-Reply-To: <5589EF5A.6010409@cs.ucla.edu> References: <5589EF5A.6010409@cs.ucla.edu> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20756 Cc: 17026@debbugs.gnu.org, 13486@debbugs.gnu.org, 20756@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) >>>>> On Tue, 23 Jun 2015 16:44:26 -0700, Paul Eggert = said: > Thanks for tracking down and diagnosing this bug. I've installed a > patch as commit 1552e6737317ea2c85e06600e178114c6b0f9fb2 in emacs > master; can you please try it in your environment? Thanks for looking into this. But it doesn't build as it is in the original environment: OS X 10.7, and the following version of llvm-gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5= 658) (LLVM build 2336.11.00) The error message is: gcc -std=3Dgnu99 -c -I/opt/local/include -Demacs -I. -I../../../emacs/trun= k/src -I../lib -I../../../emacs/trunk/lib -D_REENTRANT -I/opt/local/inclu= de/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi= -2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt= /local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/incl= ude -I/opt/local/include/cairo -I/opt/local/include -I/opt/local/include/pa= ngo-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt= /local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixm= an-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/inclu= de -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include= /libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/l= ocal/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2= .0/include -I/opt/local/include -I/opt/local/include -I/opt/local/include/= freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/= include -I/opt/local/include/libpng16 -I/opt/local/include -D_REENTRANT = -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt= /local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/gli= b-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/i= nclude/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/= local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/lo= cal/include/libpng16 -I/opt/local/include -DMAGICKCORE_HDRI_ENABLE=3D0 -DM= AGICKCORE_QUANTUM_DEPTH=3D16 -DMAGICKCORE_HDRI_ENABLE=3D0 -DMAGICKCORE_QUAN= TUM_DEPTH=3D16 -I/opt/local/include/ImageMagick-6 -I/opt/local/include/lib= png16 -I/opt/local/include/libxml2 -I/opt/local/include/dbus-1.0 -I/opt/lo= cal/lib/dbus-1.0/include -I/opt/local/include -I/opt/local/include -I/op= t/local/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/li= b/glib-2.0/include -I/opt/local/include -DORBIT2=3D1 -D_REENTRANT -I/opt/l= ocal/include/gconf/2 -I/opt/local/include/orbit-2.0 -I/opt/local/include/gl= ib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local= /include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -= I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/lib= png16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/inc= lude -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/inclu= de/libpng16 -MMD -MF deps/dispnew.d -MP -I/opt/local/include -I/opt/loca= l/include/p11-kit-1 -I/opt/local/include -D_REENTRANT -I/opt/local/include= /glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -g3 -O= 2 ../../../emacs/trunk/src/dispnew.c In file included from ../../../emacs/trunk/src/dispnew.c:33: ../../../emacs/trunk/src/keyboard.h: In function =E2=80=98kbd_buffer_store_= event_hold=E2=80=99: ../../../emacs/trunk/src/keyboard.h:461: error: expected specifier-qualifie= r-list before =E2=80=98*=E2=80=99 token ../../../emacs/trunk/src/keyboard.h:461: error: =E2=80=98struct = =E2=80=99 has no member named =E2=80=98__b=E2=80=99 ../../../emacs/trunk/src/keyboard.h:461: error: expected specifier-qualifie= r-list before =E2=80=98*=E2=80=99 token ../../../emacs/trunk/src/keyboard.h:461: error: =E2=80=98struct = =E2=80=99 has no member named =E2=80=98__b=E2=80=99 ../../../emacs/trunk/src/keyboard.h:461: error: bit-field =E2=80=98_gl_veri= fy_error_if_negative=E2=80=99 width not an integer constant make: *** [dispnew.o] Error 1 The output of gcc -E for the corresponding part is: kbd_buffer_store_event_hold (struct input_event *event, struct input_event *hold_quit) { union buffered_input_event *ev =3D (union buffered_input_event *) event; extern int (*_gl_verify_function461 (void)) [(!!sizeof (struct { unsigned= int _gl_verify_error_if_negative: (sizeof *event =3D=3D sizeof *ev && __bu= iltin_offsetof (struct { char __a; *event __b; }, __b) =3D=3D __builtin_off= setof (struct { char __a; *ev __b; }, __b)) ? 1 : -1; }))]; return kbd_buffer_store_buffered_event ((union buffered_input_event *) ev= ent, hold_quit); } If I comment out the line for the "verify" macro, the it successfully builds and runs without crash. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 21:05:47 2015 Received: (at 20756) by debbugs.gnu.org; 24 Jun 2015 01:05:47 +0000 Received: from localhost ([127.0.0.1]:55677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Z8L-0002KU-EB for submit@debbugs.gnu.org; Tue, 23 Jun 2015 21:05:46 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58288) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Z8F-0002Jy-Pb; Tue, 23 Jun 2015 21:05:40 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E206A160193; Tue, 23 Jun 2015 18:05:33 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oqFBLcOOGPB2; Tue, 23 Jun 2015 18:05:33 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F39D1160821; Tue, 23 Jun 2015 18:05:32 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SU1ASvALd8VE; Tue, 23 Jun 2015 18:05:32 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CC2F2160193; Tue, 23 Jun 2015 18:05:32 -0700 (PDT) Message-ID: <558A0257.8000600@cs.ucla.edu> Date: Tue, 23 Jun 2015 18:05:27 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: YAMAMOTO Mitsuharu Subject: Re: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type References: <5589EF5A.6010409@cs.ucla.edu> In-Reply-To: Content-Type: multipart/mixed; boundary="------------090503050502030307090005" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20756 Cc: 17026@debbugs.gnu.org, 13486@debbugs.gnu.org, 20756@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is a multi-part message in MIME format. --------------090503050502030307090005 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable YAMAMOTO Mitsuharu wrote: > ../../../emacs/trunk/src/keyboard.h:461: error: expected specifier-qual= ifier-list before =E2=80=98*=E2=80=99 token Thanks, it appears I was assuming C11 semantics that clang doesn't suppor= t. I=20 installed the attached further patch, which worked for me with clang=20 3.6.0-2ubuntu1 (Ubuntu 15.04). --------------090503050502030307090005 Content-Type: text/x-diff; name="0001-Port-selection-info-fix-to-clang.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Port-selection-info-fix-to-clang.patch" >From 4fe5cb43d9c27da933b6e6a1beedb14eba4db4e9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 23 Jun 2015 18:01:55 -0700 Subject: [PATCH] Port selection info fix to clang * src/keyboard.h (kbd_buffer_store_event_hold): Don't assume C11 semantics for alignof (Bug#20756). --- src/keyboard.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keyboard.h b/src/keyboard.h index 5278051..1b489f3 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -458,7 +458,8 @@ kbd_buffer_store_event_hold (struct input_event *event, struct input_event *hold_quit) { union buffered_input_event *ev = (union buffered_input_event *) event; - verify (sizeof *event == sizeof *ev && alignof (*event) == alignof (*ev)); + verify (alignof (struct input_event) == alignof (union buffered_input_event) + && sizeof (struct input_event) == sizeof (union buffered_input_event)); return kbd_buffer_store_buffered_event ((union buffered_input_event *) event, hold_quit); } -- 2.1.4 --------------090503050502030307090005-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 21:20:59 2015 Received: (at 20756) by debbugs.gnu.org; 24 Jun 2015 01:20:59 +0000 Received: from localhost ([127.0.0.1]:55689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7ZN4-0002gB-Di for submit@debbugs.gnu.org; Tue, 23 Jun 2015 21:20:59 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56806) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7ZMy-0002fi-JR; Tue, 23 Jun 2015 21:20:54 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 12ECEC0560; Wed, 24 Jun 2015 10:20:48 +0900 (JST) Date: Wed, 24 Jun 2015 10:20:48 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Paul Eggert Subject: Re: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type In-Reply-To: <558A0257.8000600@cs.ucla.edu> References: <5589EF5A.6010409@cs.ucla.edu> <558A0257.8000600@cs.ucla.edu> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 20756 Cc: 17026@debbugs.gnu.org, 13486@debbugs.gnu.org, 20756@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) >>>>> On Tue, 23 Jun 2015 18:05:27 -0700, Paul Eggert = said: > YAMAMOTO Mitsuharu wrote: >> ../../../emacs/trunk/src/keyboard.h:461: error: expected specifier-quali= fier-list before =E2=80=98*=E2=80=99 token > Thanks, it appears I was assuming C11 semantics that clang doesn't suppor= t. I=20 > installed the attached further patch, which worked for me with clang=20 > 3.6.0-2ubuntu1 (Ubuntu 15.04). It now builds and works for me, too. Thanks again. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 10:55:01 2016 Received: (at control) by debbugs.gnu.org; 1 Jun 2016 14:55:01 +0000 Received: from localhost ([127.0.0.1]:49981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b87Xx-0005zr-5O for submit@debbugs.gnu.org; Wed, 01 Jun 2016 10:55:01 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:35970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b87Xv-0005zd-Oe for control@debbugs.gnu.org; Wed, 01 Jun 2016 10:55:00 -0400 Received: by mail-oi0-f54.google.com with SMTP id j1so31129151oih.3 for ; Wed, 01 Jun 2016 07:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to; bh=UUb+vn+AtwgfgyKUqJ3N5KyS40kS7qw/ZjUbaqJhLyw=; b=AsIl0L4XmTrnnbqJ2GlD5HrF4+lYdisrq2majGsm4KZD7sbSwQ57x22sda1IvCjdgf KQiY6WKmfUrr/SxEA3cWDbftWJp2jBBLwu75EnVtumhylsVhJQxtiYQzsU6czoDulx56 s8CLjv2KKAgSNrHckKS/nBS1CvOunKmjpqDKHOHdX6+Nv2GNL1L1m4FucSm/+fLaovoY jIPPo1V8/x0KoSGXUdkKag6aY4gXTIqQxm7ijJ+Er1xdkOZf7DKsu7bPUHgxlB0WvxgP 64Q1mTuJ1pPOK8ax+z9Mnryzw++GsO8Qj+xLRgN2rJNv+wSZI4PTojFeqB+zNmKMu+T7 KTyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to; bh=UUb+vn+AtwgfgyKUqJ3N5KyS40kS7qw/ZjUbaqJhLyw=; b=BAVLG/o9pbQI+x6NpzCs6FmpRh5opedOzxTpjVpdIt/jwvmgr6C9uTLuZJo7l9IeYc lCVDuqKayFvJ9YMoDrs6JLLEz/yJePvJECnPAnhKPqxFX4vHLw62X4E/Tp5DZdDNQhb/ pMT221IRfFPeHQndG+SuvQhZs20ZKQYUE+NTuws3+AMO6UJ/Mwg7S6t9NZ9Q5isbX1Nc UVM9LNRSBe3lPOP38V2RQ9PIoL/nt3D21SVNWBjZPwCvtrABo5U9cXO7MSfBCqqpAqKr uZ3vYNIiJnOcG0sIbUBPH9aVaNANedfUNV1w5Kka0Vdg+qfEQLwBkIsaWyrzWANPcmRI WqLg== X-Gm-Message-State: ALyK8tKE5cLFzIyRAOGDMzJBtHgPWp0e9cQYXYWEH4yLCw+JuAOHbs/gqxiiJwv4MvkvHvoaTHwWfQAqSef+sA== MIME-Version: 1.0 X-Received: by 10.202.168.143 with SMTP id r137mr23774866oie.40.1464792893905; Wed, 01 Jun 2016 07:54:53 -0700 (PDT) Received: by 10.157.34.169 with HTTP; Wed, 1 Jun 2016 07:54:53 -0700 (PDT) Date: Wed, 1 Jun 2016 10:54:53 -0400 X-Google-Sender-Auth: boXmqenCBSsTcTYYJAJbu57gD54 Message-ID: Subject: Re: 25.0.50; struct selection_input_event data might be corrupted by assignments as another structure type From: Noam Postavsky To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tag 20756 + fixed close 20756 quit From unknown Mon Jun 23 06:00:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 30 Jun 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator