Mail Archives: djgpp/2001/10/16/05:49:16
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 -