[PATCH] string: Add tests for zero length string inputs
Richard Earnshaw
rearnsha@arm.com
Tue Sep 23 14:58:00 GMT 2014
On 23/09/14 14:57, Paul Eggert wrote:
> Richard Earnshaw wrote:
>
>> if src+1 can point outside of the address space of the program
>
> As Andreas points out, src+1 does not point outside the address space of
> the program. It is a valid pointer.
>
OK, so do we agree that for a valid pointer P, if P is *not*
dereferencable, then P-1 must be? Put another way, if P and P-1 are in
the same 'page' then it is safe to dereference them.
R.
More information about the Libc-alpha
mailing list