Re: [PATCH] sockaddr.3type: BUGS: Document that libc should be fixed using a union

2023-02-06 Thread Eric Blake via Gcc
On Sun, Feb 05, 2023 at 04:28:36PM +0100, Alejandro Colomar wrote: Regardless of the merits of the patch, let's not introduce typos: > +++ b/man3type/sockaddr.3type > @@ -120,6 +120,26 @@ .SH NOTES > .I > and > .IR . > +.SH BUGS > +.I sockaddr_storage > +was designed back when strict aliasin

Re: [PATCH] sockaddr.3type: Document that sockaddr_storage is the API to be used

2023-03-30 Thread Eric Blake via Gcc
On Thu, Mar 30, 2023 at 07:13:11PM +0200, Alejandro Colomar wrote: > POSIX.1 Issue 8 will fix the long-standing issue with sockaddr APIs, > which inevitably caused UB either on user code, libc, or more likely, > both. sockaddr_storage has been clarified to be implemented in a manner > that aliasin

Re: [PATCH] sockaddr.3type: Document that sockaddr_storage is the API to be used

2023-04-06 Thread Eric Blake via Gcc
On Wed, Apr 05, 2023 at 02:42:04AM +0200, Alejandro Colomar wrote: > Hi Eric, > > I'm going to reply both your emails here so that GCC is CCed, and they can > suggest better stuff. I'm worried about sending something to POSIX without > enough eyes checking it. So this will be a long email. Beca

Re: [PATCH] sockaddr.3type: Document that sockaddr_storage is the API to be used

2023-04-21 Thread Eric Blake via Gcc
On Fri, Apr 21, 2023 at 05:00:14PM +0200, Alejandro Colomar wrote: > > > > The wording I see in > > doesn't seem to cover the case of aliasing a sockaddr_storage as a > > protocol-specific address for setting other members. > > > > Aliasing rul

Re: [PATCH v3] sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types

2023-04-21 Thread Eric Blake via Gcc
On Fri, Apr 21, 2023 at 10:27:18PM +0200, Alejandro Colomar wrote: > Link: > Reported-by: Bastien Roucariès > Reported-by: Alejandro Colomar > Reviewed-by: Eric Blake > Cc: glibc > Cc: GCC > Cc: Stefan Puiu > Cc: Igor Sysoev > Cc: Rich Felker >