ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/12/16:19:19

Date: Thu, 12 Oct 2000 22:19:28 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Chaos" <chengin AT alpha DOT net DOT pl>
Message-Id: <2950-Thu12Oct2000221927+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h
CC: djgpp AT delorie DOT com
In-reply-to: <39e60652@news.vogel.pl> (chengin@alpha.net.pl)
Subject: Re: free() error
References: <39e36135 AT news DOT vogel DOT pl> <edq6usk7vhlvrlmou2lmdnuhvv1krm060t AT 4ax DOT com> <39e60652 AT news DOT vogel DOT pl>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Chaos" <chengin AT alpha DOT net DOT pl>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 12 Oct 2000 20:46:54 +0200
> >
> >You probably have a buffer overflow somewhere, writing garbage over
> >the data structure that malloc()/free() uses to keep track of the
> >heap.  For more information, look in DJGPP FAQ entry 9.2.  YAMD, yet
> >another malloc() debugger by Nate Eldredge, may help:
> >  http://www3.hmc.edu/~neldredge/yamd/
> 
> Strange. All free()'s are at the very end of program.

It doesn't matter.  If the code elsewhere in your program has
overwritten some of the allocated buffers, any call to free() can
crash, because malloc and free maintain information about memory
allocations right before the beginning and after the end of the buffer
that you get from malloc.

- Raw text -


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