[PATCH] nss: remove undefined behavior and optimize getaddrinfo
Sam James
sam@gentoo.org
Mon May 5 08:32:52 GMT 2025
Collin Funk <collin.funk1@gmail.com> writes:
> Hi Sam,
Hi Collin,
>
> Sam James <sam@gentoo.org> writes:
>
>> Are you running using his UBSAN patches, or doing something else (just
>> noticed by inspection or ...)?
>
> I noticed it a while ago with -Wshift-overflow=2 but didn't get around
> to fixing it until this patch. AFAIK Clang and GCC have always handled
> '1 << 31' correctly so I wasn't in much of a rush to fix it. The other
> one I fixed caused very annoying warning spam if you included
> <sys/mount.h> [1].
ACK - thanks! (I just wanted to make sure there wasn't duplicate work
going on.)
>
> Testing glibc with UBSAN seems interesting though, so I will probably
> check out that branch now that I know about it.
>
> Collin
>
> [1] https://inbox.sourceware.org/libc-alpha/20250217055647.493638-1-collin.funk1@gmail.com/#t
More information about the Libc-alpha
mailing list