Message ID | 20230421202718.21831-1-alx@kernel.org |
---|---|
State | New |
Headers | show |
Series | [v3] sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types | expand |
On Fri, Apr 21, 2023 at 10:27:18PM +0200, Alejandro Colomar wrote: > Link: <https://austingroupbugs.net/view.php?id=1641> > Reported-by: Bastien Roucariès <rouca@debian.org> > Reported-by: Alejandro Colomar <alx@kernel.org> > Reviewed-by: Eric Blake <eblake@redhat.com> > Cc: glibc <libc-alpha@sourceware.org> > Cc: GCC <gcc@gcc.gnu.org> > Cc: Stefan Puiu <stefan.puiu@gmail.com> > Cc: Igor Sysoev <igor@sysoev.ru> > Cc: Rich Felker <dalias@libc.org> > Cc: Andrew Clayton <andrew@digital-domain.net> > Cc: Richard Biener <richard.guenther@gmail.com> > Cc: Zack Weinberg <zack@owlfolio.org> > Cc: Florian Weimer <fweimer@redhat.com> > Cc: Joseph Myers <joseph@codesourcery.com> > Cc: Jakub Jelinek <jakub@redhat.com> > Cc: Sam James <sam@gentoo.org> > Signed-off-by: Alejandro Colomar <alx@kernel.org> > --- > > Hi Eric, > > I took your informal review as a "Reviewed-by". Please confirm. > I've also modified the small wording thingy you suggested. For the avoidance of doubt ;) Reviewed-by: Eric Blake <eblake@redhat.com>
diff --git a/man3type/sockaddr.3type b/man3type/sockaddr.3type index 2fdf56c59..cf8d601f5 100644 --- a/man3type/sockaddr.3type +++ b/man3type/sockaddr.3type @@ -117,6 +117,14 @@ .SH HISTORY was invented by POSIX. See also .BR accept (2). +.PP +These structures were invented before modern ISO C strict-aliasing rules. +If aliasing rules are applied strictly, +these structures would be extremely difficult to use +without invoking Undefined Behavior. +POSIX Issue 8 will fix this by requiring that implementations +make sure that these structures +can be safely used as they were designed. .SH NOTES .I socklen_t is also defined in