www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/30/18:06:57

Message-ID: <363A411E.68F578C2@gmx.net>
Date: Fri, 30 Oct 1998 21:43:42 -0100
From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Organization: none provided
X-Mailer: Mozilla 4.01 [de] (Win95; I)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: V 2.02 'free' problem
X-Priority: 3 (Normal)
References: <Pine DOT SUN DOT 3 DOT 91 DOT 981029210253 DOT 19933h-100000 AT is> <36392483 DOT 13ED47DF AT montana DOT com>
Reply-To: djgpp-workers AT delorie DOT com

bowman wrote :
> 
> Still playing with it, but nothing is jumping out to grab me. It
> certainly looks like
> a problem with the block structure being corrupted. MC is known to
> have
> memory leaks,
> but if it is overrunning the buffer, i am in deep trouble, since the
> failure occurs from
> many different sequences of calls. I've exercised it through the same
> steps, and after 4 or
> 5 thousand invocations of 'free' something goes sour.

One hint to localize the problem. Link your program (MC) with
the malloc functions from bsdmallo.c (the same directory like
malloc.c) and see if there are still some mystic crashes. If
not, you can be nearly sure that the problem is either in the
malloc functions from malloc.c (only 10% for this) or in invalid
memory usage by your program (the other 90%).

For the second case, you can compile bsdmallo.c with

-DDEBUG -DRCHECK

and then you might get an abort which will help you more
to localize the real problem.

Robert
-- 
******************************************************
* email:   Robert Hoehne <robert DOT hoehne AT gmx DOT net>     *
* Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW:     http://www.tu-chemnitz.de/~sho/rho        *
******************************************************


- Raw text -


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