[PATCH] Improve check against integer wraparound in hcreate_r [BZ #18240]

Florian Weimer fweimer@redhat.com
Mon Feb 1 18:29:00 GMT 2016


On 02/01/2016 07:26 PM, Andreas Schwab wrote:
> Szabolcs Nagy <szabolcs.nagy@arm.com> writes:
> 
>> (i did not notice earlier as in my normal test
>> environment memory overcommit is off so the
>> test case just fails with ENOMEM, i'm not sure
>> how to handle such tests where huge memory is
>> allocated)
> 
> Perhaps the test should set a VM limit so that the allocation fails even
> if you have huge amount of available memory.  Performing the allocation
> isn't the main point of the test.

Yes, this seems like a reasonable improvement.

I didn't see this because I apparently do not have sufficient amounts of
memory in my test machine.

Florian



More information about the Libc-alpha mailing list