[PATCH] more out of bounds checking improvements
Tulio Magno Quites Machado Filho
tuliom@ascii.art.br
Fri May 7 19:30:35 GMT 2021
Andreas Schwab <schwab@linux-m68k.org> writes:
> makedb.c: In function 'write_output':
> makedb.c:797:7: error: 'writev' specified size 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=]
> 797 | if (writev (fd, iov, iov_nelts) != keydataoffset)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../include/sys/uio.h:2,
> from makedb.c:39:
> ../misc/sys/uio.h:52:16: note: in a call to function 'writev' declared with attribute 'read_only (2, 3)'
> 52 | extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
> | ^~~~~~
> cc1: all warnings being treated as errors
> make[2]: *** [../o-iterator.mk:9: /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.515.g3bf0b4f2cd/cc-base/nss/makedb.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.515.g3bf0b4f2cd/nss'
> make[1]: *** [Makefile:479: nss/others] Error 2
> make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.515.g3bf0b4f2cd'
> make: *** [Makefile:9: all] Error 2
I'm also reproducing this on ppc32 with GCC 10.
I'm not using -DNDEBUG.
--
Tulio Magno
More information about the Libc-alpha
mailing list