~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to memcheck/tests/custom_alloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-06-26 00:17:17 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20060626001717-qi51nzty57cb12q6
Tags: upstream-3.2.0
Import upstream version 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
   // program to be using it unless its handed out by custom_alloc()
23
23
 
24
24
   // with redzones, better not to have it
25
 
   VALGRIND_MAKE_NOACCESS(p, SUPERBLOCK_SIZE);
 
25
   VALGRIND_MAKE_MEM_NOACCESS(p, SUPERBLOCK_SIZE);
26
26
 
27
27
   return p;
28
28
}
86
86
   custom_free(array3); // mismatched free (ok without MALLOCLIKE)
87
87
 
88
88
   make_leak();
89
 
   return array[0];     // use after free (ok without MALLOCLIKE/MAKE_NOACCESS)
 
89
   return array[0];     // use after free (ok without MALLOCLIKE/MAKE_MEM_NOACCESS)
90
90
                        // (nb: initialised because is_zeroed==1 above)
91
91
                        // unfortunately not identified as being in a free'd
92
92
                        // block because the freeing of the block and shadow