[PATCH] stdlib-bsearch: middle element calculation may overflow
Florian Weimer
fweimer@redhat.com
Thu Mar 16 08:19:00 GMT 2017
On 03/16/2017 09:17 AM, Paul Eggert wrote:
> Mike Frysinger wrote:
>> do you a simple test case we can include ?
>
> On x86-64 any such test would require more than 2**63 members in the
> array. Not sure I'd want to run that....
It's impossible to write a test case for x86_64 because it's more like a
47-bit architecture.
Most of the array elements do not actually have to be present, so it
should be possible to write a test on those architectures which can
allocate more than half of the address space.
Thanks,
Florian
More information about the Libc-alpha
mailing list