summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-11 22:13:00 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-22 00:00:54 +0200
commit21ae07e7cd7b54967d8e486e2b443816debe7fa1 (patch)
tree2d53eee4940a4b1e3508edaba2a77a44321258ac
parent59e44e4511391a98f531c08aaba17391f3b7075b (diff)
sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types
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>
-rw-r--r--man3type/sockaddr.3type8
1 files changed, 8 insertions, 0 deletions
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 @@ POSIX.1-2001.
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