www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/16/06:23:12

Date: Tue, 16 Oct 2001 12:17:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Niklas Pettersson <Niklas_Pson AT nosmam DOT hotmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Stack problem?
In-Reply-To: <913C66CA4NiklasPsonnospamhotm@130.235.20.4>
Message-ID: <Pine.SUN.3.91.1011016121444.2963C-100000@is>
MIME-Version: 1.0
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

On 16 Oct 2001, Niklas Pettersson wrote:

> I have a friend (yes!) that has a programming problem. The program is 
> making very strange things and I'm 99% sure that he makes a memory error.. 
> So I wrote a little program to check for memory leaks, that he didn't 
> returned memory twice, check that he did not write outside the limits of 
> arrays on the HEAP... It was no problem there.

How about uninitialized memory/pointers?  Did you check that?

> So I guess that leaves us 
> with the possibility that an array allocated on the stack is overwritten 
> and causing the return address to be obscured.. So, how can we check this? 

This should be clearly visible in the crash message printed when the 
program crashes, see section 12.2 of the FAQ for how to detect stack 
overflows in the crash message.

- Raw text -


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