www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/16/04:36:20

From: Niklas_Pson AT nosmam DOT hotmail DOT com (Niklas Pettersson)
Newsgroups: comp.os.msdos.djgpp
Subject: Stack problem?
Date: 16 Oct 2001 08:00:50 GMT
Organization: Lund Institute of Technology, Sweden
Lines: 18
Message-ID: <913C66CA4NiklasPsonnospamhotm@130.235.20.4>
NNTP-Posting-Host: npedt97.univ.vxu.se
User-Agent: Xnews/03.04.11
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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?

Many thanks

/ Niklas

- Raw text -


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