Re: AfxIsValidAddress

2015-07-18 Thread Kyle Sluder
On Tue, Jul 14, 2015, at 12:09 PM, Wim Lewis wrote: > It checks whether a given address range is mapped (or equivalent > terminology on Windows). Windows has another function that programmers > like to use, IsBadReadPtr(), that does something similar. Raymond Chen (compatibility engineer at Micros

Re: AfxIsValidAddress

2015-07-14 Thread Raglan T. Tiger
> On Jul 14, 2015, at 11:22 AM, Scott Ribe wrote: > > This is a definite FUGGEDABOUTIT situation. I already have! -rags ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: AfxIsValidAddress

2015-07-14 Thread Scott Ribe
On Jul 14, 2015, at 11:09 AM, Wim Lewis wrote: > > It checks whether a given address range is mapped (or equivalent terminology > on Windows). Windows has another function that programmers like to use, > IsBadReadPtr(), that does something similar. No, it doesn't. It is *DOCUMENTED* to do that

Re: AfxIsValidAddress

2015-07-14 Thread Jens Alfke
> On Jul 14, 2015, at 10:09 AM, Wim Lewis wrote: > > If you don't know (with enough certainty to omit a call to IsValidAddress) > whether a pointer is readable, you certainly don't know whether the data > there is what you expect to be there. Plus, preflighting access this way involves race c

Re: AfxIsValidAddress

2015-07-14 Thread Wim Lewis
On Jul 14, 2015, at 9:44 AM, Jens Alfke wrote: >> On Jul 14, 2015, at 9:13 AM, Raglan T. Tiger wrote: >> >> Is there a Cocoa or OS X equivalent to the Windows function >> AfxIsValidAddress ? > > I don’t know, I’m not a Windows programmer. It would help if you told us what > that function doe

Re: AfxIsValidAddress

2015-07-14 Thread Scott Ribe
On Jul 14, 2015, at 10:44 AM, Jens Alfke wrote: > > I don’t know, I’m not a Windows programmer. It would help if you told us what > that function does. It appears to be a placebo for debugging memory problems:

Re: AfxIsValidAddress

2015-07-14 Thread Jens Alfke
> On Jul 14, 2015, at 9:13 AM, Raglan T. Tiger wrote: > > Is there a Cocoa or OS X equivalent to the Windows function AfxIsValidAddress > ? I don’t know, I’m not a Windows programmer. It would help if you told us what that function does. —Jens ___