]> git.ipfire.org Git - thirdparty/glibc.git/commit
Make padding in struct sockaddr_storage explicit [BZ #20111]
authorFlorian Weimer <fweimer@redhat.com>
Mon, 23 May 2016 17:43:09 +0000 (19:43 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 24 May 2016 09:21:54 +0000 (11:21 +0200)
commitf2225475118c8804b1b31731bdfb3f76eb179e6d
treeb73e92b7c2135b137f4f2d15995d724340d1d62c
parentbdce95930e1d9a7d013d1ba78740243491262879
Make padding in struct sockaddr_storage explicit [BZ #20111]

This avoids aliasing issues with GCC 6 in -fno-strict-aliasing
mode.  (With implicit padding, not all data is copied.)

This change makes it explicit that struct sockaddr_storage is
only 126 bytes large on m68k (unlike elsewhere, where we end up
with the requested 128 bytes).  The new test case makes sure that
this does not happen on other architectures.

(cherry picked from commit 3375cfafa7961c6ae0e509c31c3b3cef9ad1f03d)
ChangeLog
bits/sockaddr.h
bits/socket.h
inet/Makefile
inet/tst-sockaddr.c [new file with mode: 0644]
sysdeps/mach/hurd/bits/socket.h
sysdeps/unix/bsd/bits/sockaddr.h
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/m68k/bits/sockaddr.h [new file with mode: 0644]