This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ 20628] make mallinfo saturating
- From: DJ Delorie <dj at redhat dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: carlos at redhat dot com, libc-alpha at sourceware dot org
- Date: Wed, 05 Oct 2016 21:46:10 -0400
- Subject: Re: [PATCH] [BZ 20628] make mallinfo saturating
- Authentication-results: sourceware.org; auth=none
Paul Eggert <eggert@cs.ucla.edu> writes:
> These don't look right, as INTERNAL_SIZE_T might not be wider than int,
In which case, the values we're adding up won't overflow because memory
is limited to an int-sized address space.
> Also, if SUM is INT_MIN
"Assumes ADD and SUM are positive."