Robert Shearman wrote:
On Sun, 2004-06-06 at 19:26, Robert Reif wrote:
Not a real program but Microsoft's API checking programs do try non NULL bad pointers and expect an error return rather than a program crash.
Are you saying checking a good pointer can cause problems?
No, checking a bad pointer can cause problems. See: http://blogs.msdn.com/LarryOsterman/archive/2004/05/18/134471.aspx
Rob
Interesting read. I would have thought Microsoft would have checked if the memory range was already mapped and had the proper access permission rather than just accessing it and catching the page fault. The whole point of the check is to prevent a problem, not cause it. It's hard to believe that's what they are doing. Explains a lot though.