This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] string: Add tests for zero length string inputs


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]