www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/16/18:47:01

From: damon AT WRONG DOT redshift DOT com (Damon Casale)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: fclose???
Date: Fri, 16 Mar 2001 23:40:14 GMT
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <3ab2a399.1324253@news.redshift.com>
References: <3AAAE89C DOT 6050002 AT operamail DOT com>
X-Newsreader: Forte Free Agent 1.21/32.243
X-Complaints-To: newsabuse AT supernews DOT com
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 10 Mar 2001 21:53:16 -0500, Sahab Yazdani
<sahaby AT operamail DOT com> wrote:

>Hello everybody, i'm having a whole string of strange problems which 
>seem to be very loosely interconnected.  The first is that my program is 
>crashing with a call to fclose.  I've checked the pointers and they seem 
>to be fine (as far as I can tell). ...

[snip]

A useful little trick I've found to checking pointers is to examine
the DWORD values 4 bytes and 8 bytes immediately before the pointer
itself.  These values contain allocation information.  If they're
corrupted from being overwritten, that could easily cause a crash.

Try running your program under GDB and setting a watchpoint on these
two locations.  Then take a look at the code which triggers the
watchpoint.

Good luck.  :-)

Damon Casale, damon AT WRONG DOT redshift DOT com (remove the obvious)
Didn't your mother ever tell you it's not nice to point?  ;-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019