On Mon, Oct 14, 2019 at 04:27:04PM +0000, Maxime Villard wrote: > Module Name: src > Committed By: maxv > Date: Mon Oct 14 16:27:04 UTC 2019 > > Modified Files: > src/sys/kern: uipc_socket.c > > Log Message: > Add a check before the memcpy. memcpy is defined to never take NULL as > second argument, and the compiler is free to perform optimizations knowing > that this argument is never NULL. > > In this particular case, it was harmless. But still good to fix.
This is generally agreed to be a bug in the combination of GCC and glibc and something we do not agree with. Compare the lack of attribute nonnull on memcpy and friends. Joerg