|
From: Matthias R. <mre...@in...> - 2006-04-05 20:29:40
|
Dear valgrind developers,
Thanks for providing this great tool. Here is a simple example where
Rational Purify fails to find the problem, but valgrind is successful.
If you test this code once with #define TEST_TYPE char and once with
#define TEST_TYPE int, you will see that valgrind finds the
uninitialized memory problem in both cases, but Purify only detects the
problem for the "int" case.
Thanks,
Matthias
#include <malloc.h>
#include <stdio.h>
#define TEST_TYPE char
int main()
{
TEST_TYPE *c;
c =3D (TEST_TYPE *)malloc(sizeof(TEST_TYPE));
(*c) |=3D 1;
printf("0x%x\n", *c);
free(c);
return 0;
}
|