2 /* Basic check of variable location identification, in a zero-biased
5 /* Relevant compile flags are:
7 -Wall -g -I$prefix/include/valgrind
9 eg -Wall -g -I`pwd`/Inst/include/valgrind
15 #include "memcheck/memcheck.h"
17 /* Cause memcheck to complain about the address "a" and so to print
18 its best guess as to what "a" actually is. a must be
21 void croak ( void* aV
)
24 char* undefp
= malloc(1);
28 (void) VALGRIND_CHECK_MEM_IS_DEFINED(a
, 1);
41 char global_i2
[10] = { 1,2,3,4,5,6,7,8,9,10 };
47 char* onheap
= malloc(3);
54 croak( &global_u2
[3] );
55 croak( &global_i2
[7] );