www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/31/01:38:06

Message-ID: <363AB024.82A592@montana.com>
Date: Fri, 30 Oct 1998 23:37:24 -0700
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: V 2.02 'free' problem
References: <199810300231 DOT VAA20330 AT indy DOT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com


DJ Delorie wrote:
> 
> Have you tried one of the malloc debuggers, like Electric Fence or
> dmalloc?  They should work with djgpp.

I'd like to put a plug in for mss1.zip, from the v2tk collection. In
concept, it is much like dmalloc, except it is ready to build for djgpp
right out of the box, and the documents are not *nix oriented. Great
tool.

The first problem I've found: At one point I'd strcat'd ".bat" onto the
end of a filename so I could
pass it off to command.com. Unfortunately, the 'filename' was actually a
pointer into a buffer returned by 'strdup', so the added chars nailed
the fencepost. Sooner or later, 'free' would attempt to traverse the
corrupted node, and fail. Just the standard issue careless error, but it
had never surfaced with the roomier 2.01 allocations. I'd been looking
in the general area, but mss1 pointed right at the offending line. 

Other than that, the beta is trouble free so far, and MidnightCommander
does tend to exercise the library pretty thoroughly.

- Raw text -


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