This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] dynarray: Set errno on overflow-induced allocation failure
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: DJ Delorie <dj at redhat dot com>, Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 30 Aug 2017 11:29:33 -0700
- Subject: Re: [PATCH] dynarray: Set errno on overflow-induced allocation failure
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On 08/30/2017 11:01 AM, DJ Delorie wrote:
Ah, ok. Consistency is good :-)
It's not just consistency, it's utility. If a memory allocator fails due
to a request for 2**64 bytes of memory, ENOMEM is more likely to
communicate useful info to the end user than any other errno value would.