NT 4.0 unchecked memory access violation!!! 
Author Message
 NT 4.0 unchecked memory access violation!!!

The following piece of code runs without error on Windows 4.0 (service
pack 2) and is terminated with a dialog message under 3.51 (service pack
4).

The program calls CopyRect with an uninitilized pointer, which attempts
to read from memory location 0.  I realize that NT 4.0 moved code to
ring zero to enhance performance.  How much did they move?  Will NT 4.0
allow writes to location 0 as well?  Is NT no longer a memory access
protected Operating System?

#include <afxwin.h>
int main ()
{
    RECT    dstRect;
    LPRECT  srcRect;

    srcRect = 0;

    CopyRect (&dstRect, srcRect);

    return 1;

Quote:
}

----------------------------------------------------------------------
Frank C. Garber               Voice: 860.627.1629 - current assignment
Software Devel. Consultant    Fax:   860.627.1666

Burlington, CT  06013-2220    WWW:   http://www.*-*-*.com/ ~garberfc

    >>Only by attempting the absurd do we achieve the impossible<<

----------------------------------------------------------------------



Tue, 03 Aug 1999 03:00:00 GMT  
 NT 4.0 unchecked memory access violation!!!


Quote:
>The following piece of code runs without error on Windows 4.0 (service
>pack 2) and is terminated with a dialog message under 3.51 (service pack
>4).

What type of dialog message?

My guess is that your 3.51 was a debug version which performed
parameter checking and your 4.0 version is not.

I would expect access to low memory to be an access violation at any
level.
--------------------------------------------

Software Engineer
Datalytics, Inc.      http://www.datalytics.com



Mon, 09 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. NT 4.0 allows memory access violations!!!

2. Shared Memory, NT 4.0, object memory allocation (new)

3. Access Violation (NTDLL.DLL): 0xC0000005 only in Debug Mode on NT and Win2k

4. Virtual Memory paging when an app minimizes in NT 4.0

5. fwrite on NT 4.0 Server causing memory depletion

6. Virtual Memory paging when an app minimizes in NT 4.0

7. Windows NT 4.0 and memory management

8. ATL dll problem 0xC0000005 access violation or memory could not be read

9. memory access violation

10. memory access violations

11. Memory Access Violation in Release mode only

12. Memory Access Violation in Release Mode-Solution Found

 

 
Powered by phpBB® Forum Software