It sure is and I expect Valgrind 3.4 to report it.But it doesn't report
memory leaks and heap block overrun when run with my test
program.However,Valgrind 3.2.3 reports the same errors when run with the
test program just like one'd  expect it to.

-----Original Message-----
From: shuLhan [mailto:[email protected]] 
Sent: Monday, February 16, 2009 12:53 AM
To: [email protected]
Cc: Nandini Chandra (nandchan)
Subject: Re: [Valgrind-users] Unitialised value in ld.so, lib.so with
valgrind 3.4

On Monday 16 February 2009 12:08:05 Nandini Chandra (nandchan) wrote:
> Sample program:
> ---------------------------------------
> #include <stdlib.h>
>
>   void foo(void)
>   {
>      int* x = malloc(10 * sizeof(int));
>
>      x[10] = 0;        // problem 1: heap block overrun
>   }                    // problem 2: memory leak -- x not freed
>

This is a very basic C language error. 'x' only have index 0..9, not 10.

--
~ shuLhan ~

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to