[Valgrind-users] about array out of bounds

2012-02-23 Thread 张昭
Hi all: I use zhangzhao-debian:~/work/tests# /opt/valgrind-3.7.0/bin/valgrind --version valgrind-3.7.0 to test follow code #include stdlib.h static int b[60]; int main ( int argc, char *argv[] ) { int a[50]; int ret; /*a[50] = 1; a[51] = 1;*/ b[59] = 1; b[60] =

Re: [Valgrind-users] about array out of bounds

2012-02-23 Thread Philippe Waroquiers
On Thu, 2012-02-23 at 17:59 +0800, 张昭 wrote: static int b[60]; int main ( int argc, char *argv[] ) { int a[50]; int ret; /*a[50] = 1; a[51] = 1;*/ b[59] = 1; b[60] = 2; return EXIT_SUCCESS; } and I find this result; why? I always have a array out