Why was the reallocarray function not added to glibc?
Paul Eggert
eggert@cs.ucla.edu
Fri Apr 7 20:47:00 GMT 2017
The patch should use gcc builtins (when available) to detect integer
overflow instead of trying to do it by hand. You can do this by using
the INT_MULTIPLY_OVERFLOW macro of Gnulib, documented here:
https://www.gnu.org/software/gnulib/manual/html_node/Integer-Type-Overflow.html
The easist way to use that macro is to copy gnulib intprops.h as-is into
glibc, and then use "#include <intprops.h>". It need not be a public
include file. Here's the current source:
http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/intprops.h
More information about the Libc-alpha
mailing list