www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/16/05:49:16

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Stack problem?
Date: 16 Oct 2001 09:19:15 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 26
Message-ID: <9qgu2j$9lu$3@antares.lu.erisoft.se>
References: <913C66CA4NiklasPsonnospamhotm AT 130 DOT 235 DOT 20 DOT 4>
NNTP-Posting-Host: merope.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Niklas Pettersson (Niklas_Pson AT nosmam DOT hotmail DOT com) wrote:
: Hello!

: 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. 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? 
: The program is about 15 klines of code so he don't want to replace all char 
: [] with std::string and so on.. I know that rational purifyer can be used 
: in Visual C++ but this is a DJGPP project with a lot of low-level code that 
: access the PC-Hardware.. My question is, are there any programs for DJGPP 
: that can be used to check for memory errors on the stack?

Post the crash message (if you got one).

Another idea; it's not checking for errors, but you can increase the
amount of stack allocated and see if the crash goes away. See FAQ
15.9.


Right,

						MartinS

- Raw text -


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