Eric Blake wrote:
POSIX is allowed to make guarantees where the
C standard left things unspecified, particularly if those guarantees are
already something that many coders are already relying on because they
don't know any better.
Yes, Gnulib code makes several such assumptions, documented in the Gnulib
manual. See:
https://www.gnu.org/software/gnulib/manual/html_node/Portability-guidelines.html
For example, Gnulib code assumes that adding zero to a null pointer results in a
null pointer. Luckily for us, -fsanitize=undefined doesn't try to catch these
other violations of the standard, something that would waste even more of
everybody's time.
Perhaps we should add memcpy (0, 0, 0) to that section of the Gnulib manual, if
only to document our irritation at -fsanitize=undefined crying wolf here.