Article View: comp.os.ms-windows.programmer.memory
Article #6Re: What *is* a General Protection Fault
From: Viet-Trung Luu
Date: Tue, 26 Sep 1995 07:14
Date: Tue, 26 Sep 1995 07:14
26 lines
1723 bytes
1723 bytes
On 25 Sep 1995, David Preece wrote: > ..I was always under the impression that a GPF was Windoze's way > of stopping one application from writing over anothers' memory. > Am I right? > From what I know, the answer is "sort of". 'Doze *detects* such violations but does not necessarily stop them. It then kills the offending program by way of a GPF (after the damage has been done). That's why 'Doze tends to be unstable after GPFs. > And if so, why is this happening: > > I am allocating a very complex dialog box on the heap. When compiled > with Visual C++ in debug mode, it executes fine. When compiled in > release mode (with the compiler and linker options otherwise identical) > this dialog box GPF's. There is probably a bug in there. Sometimes seg. violations go undetected, since even though a program is writing to the wrong part of memory, it may still own that memory. However, when you eliminate the extra debugging code, the program may end up straying outside its bounds. Look for stray pointers and the like. - Trung
Technical Details
Message-ID:
<Pine.SUN.3.91.950926030945.27808A-100000@napier.uwaterloo.ca>Path:
arc1-ca.pugleaf.net!napier.uwaterloo.ca!vluuReferences:
<446uh6$ieu@zeus.tcp.co.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.memory,comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++ Path: arc1-ca.pugleaf.net!napier.uwaterloo.ca!vluu From: Viet-Trung Luu <vluu@napier.uwaterloo.ca> Subject: Re: What *is* a General Protection Fault Sender: news@undergrad.math.uwaterloo.ca (news spool owner) Message-ID: <Pine.SUN.3.91.950926030945.27808A-100000@napier.uwaterloo.ca> In-Reply-To: <446uh6$ieu@zeus.tcp.co.uk> Date: Tue, 26 Sep 1995 07:14:48 GMT Content-Type: TEXT/PLAIN; charset=US-ASCII References: <446uh6$ieu@zeus.tcp.co.uk> Nntp-Posting-Host: napier.uwaterloo.ca Mime-Version: 1.0 Organization: University of Waterloo