www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/12/03:41:56

Date: Wed, 12 Jan 2000 09:07:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: jazir <entropic AT mpx DOT com DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: upgrade chaos
In-Reply-To: <387BE4CD.1070AA75@mpx.com.au>
Message-ID: <Pine.SUN.3.91.1000112090611.28074S-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Please don't change the subject, even in minor ways.  It makes it hard
to track the thread as it evolves.

On Wed, 12 Jan 2000, jazir wrote:

>   thanks fr posting that Mark, i'm glad i'm not the only one with
> troubles.

Certain bugs are known to appear in code written by several people
independently ;-).

>   today i recompiled the program and tried again...rather then in free(), 
> the SIGSEGV occurs in malloc().  i am fairly certain that these kinds of
> errors should *never* happen.  there is nothing my code can do that should
> make free() fail is there?

These are all signs of the same trouble I described in another
message: your code overruns the end of the allocated buffer, or tries
to free it more than once.

>   another problem:   i was compiling yet another of my old programs, and i
> got the SIGSEGV from free(), but the stack displayed after the crash only
> had free in it..not where it was called from.  this is all very weird.

Take a look at section 12.2 of the FAQ, it explains how this can
happen.  In a nutshell: your code probably overwrites the stack, and
thus the library function which prints the traceback cannot unwind the
stack correctly.

- Raw text -


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