Mail Archives: djgpp/2001/10/16/06:23:12
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 -