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: libc-alpha at sourceware dot org
- Date: Tue, 27 Sep 2016 15:17:41 -0400
- Subject: Re: [PATCH] [BZ 20628] make mallinfo saturating
- Authentication-results: sourceware.org; auth=none
I considered that, but given that a 64-bit address space wraps "int" 4
billion times, I doubt allowing unsigned conversions adds much value. I
chose INT_MAX because it's still "biggest" of the valid ABI-compliant
return values. The ABI is broken anyway on 64-bit size_t systems, I
think the only real value in this type of patch is making sure the user
knows the value is "wrong", rather than trying to return useful data.
But yeah, just as easy to do it either way. I'll get some popcorn and
let you regulars argue it out :-)