Path: utzoo!attcan!uunet!aplcen!haven!umbc3!mars.cs.umbc.edu!miket From: miket@mars.cs.umbc.edu (Mike Taube) Newsgroups: comp.os.msdos.programmer Subject: Re: NULL pointer error Keywords: Null dos error Message-ID: <3620@umbc3.UMBC.EDU> Date: 19 Jul 90 01:54:39 GMT References: <2008@bnlux0.bnl.gov> <27092@netnews.upenn.edu> <319@taumet.com> Sender: newspost@umbc3.UMBC.EDU Reply-To: miket@mars.cs.umbc.edu.UUCP (Mike Taube) Organization: University of Maryland Baltimore County Lines: 29 In article <319@taumet.com> steve@taumet.com (Stephen Clamage) writes: >weisen@eniac.seas.upenn.edu (Neil Weisenfeld) writes: >>If the program is attempting to write to a NULL pointer, you could >>try watching address 0x0000:0x0000 as this is where the "NULL" pointer >>points. > >Sadly, it's not this simple. The NULL pointer error is reported for >a range about about 128 bytes starting at data address zero. In a small >data model program, this is not 0x0000:0x0000, but addresses DS:0x0000 - >DS:0x007F. I don't believe this error can be reliably reported for >other-model programs, since there is no place to put the checksummed data >for comparison at program exit. >-- > >Steve Clamage, TauMetric Corp, steve@taumet.com You may try this, though... initialize a pointer to char to be NULL then in a loop, use putchar(*ptr) for about 20 chars or so this will print out Microsoft's copyright message that they always put at the NULL memory location. It doesn't work ALL the time, but when it does it's a lifesaver by the way... don't DON'T use printf.. it doesn't work Mike Taube MikeT@cs.umbc.edu miket@umbc2.bitnet ...uunet!umbc3!miket