delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/27/08:25:36

Date: Mon, 27 Sep 1999 09:43:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: GAMMELJL AT SLU DOT EDU
cc: djgpp AT delorie DOT com
Subject: Re: problem with new malloc.c attn: Eli Zaretskii
In-Reply-To: <01JGFEX6A3QM8WVZGM@SLU.EDU>
Message-ID: <Pine.SUN.3.91.990927094315.8548E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 26 Sep 1999 GAMMELJL AT SLU DOT EDU wrote:

>      When I #include malloc.c in my source file, I have no idea why
> the symifier reports a _free statement at line 312 of my source code.

That's the manifestation of your bug.  I believe Michael Bukin posted
a message which pinpointed the problem in your code, whereby you copy
objects and thus cause the same object to be deleted more than once.
This calls `free' on a chunk of memory that was already free'd, and is
the reason for the crashes.

> One of your messages confirmed that you believe there is an error
> in the djgpp memory managers and something is getting overwritten.

This is a misunderstanding.  There are no known problems like that in
DJGPP.  What I meant was that your application causes the crashes by
overwriting memory that is allocated by malloc/new.  Passing a free'd
memory to `free' also has this effect.

- Raw text -


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