Date: Tue, 16 Oct 2001 12:17:42 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Niklas Pettersson cc: djgpp AT delorie DOT com Subject: Re: Stack problem? In-Reply-To: <913C66CA4NiklasPsonnospamhotm@130.235.20.4> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.