On Mon, 21 Nov 2005, Giovanni Bajo wrote:

I didnt get your point. I am allocating space only for 400 inregers
then as soon as in the loop if it crosses the value of 400 , it should
have given a segementation voilation ?

No. For that to happen, you need some memory checker. GCC has -fmudflap, try
with that. Recent versions of glibc also have their internal memory buffer
checker, it probably triggers the segmentation fault when you free the buffer
which you have overflown.

Valgrind will find this error too (www.valgrind.org).

Nick

Reply via email to