From: Nicholas Nethercote Date: Sat, 10 Jul 2004 16:01:52 +0000 (+0000) Subject: Don't force tool redzones to be multiples of 8. X-Git-Tag: svn/VALGRIND_2_1_2~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa925bbfbeff3750733c7d7337baf0f39681e9f8;p=thirdparty%2Fvalgrind.git Don't force tool redzones to be multiples of 8. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2463 --- diff --git a/coregrind/vg_default.c b/coregrind/vg_default.c index bdc9e1ffe7..caa540ea40 100644 --- a/coregrind/vg_default.c +++ b/coregrind/vg_default.c @@ -66,9 +66,9 @@ void malloc_panic ( const Char* fn ) /*--- Replacing malloc et al ---*/ /*------------------------------------------------------------*/ -/* Default redzone for CLIENT arena of Valgrind's malloc() is 4 bytes */ +/* Default redzone size for CLIENT arena of Valgrind's malloc() */ __attribute__ ((weak)) -UInt VG_(vg_malloc_redzone_szB) = 4; +UInt VG_(vg_malloc_redzone_szB) = 8; Bool VG_(sk_malloc_called_by_scheduler) = False; diff --git a/coregrind/vg_malloc2.c b/coregrind/vg_malloc2.c index b3a3d33b23..c21f3eb525 100644 --- a/coregrind/vg_malloc2.c +++ b/coregrind/vg_malloc2.c @@ -251,7 +251,7 @@ void ensure_mm_init ( void ) if (init_done) return; - /* Use a checked red zone size of 1 word for our internal stuff, + /* Use checked red zones (of various sizes) for our internal stuff, and an unchecked zone of arbitrary size for the client. Of course the client's red zone can be checked by the tool, eg. by using addressibility maps, but not by the mechanism implemented @@ -270,7 +270,6 @@ void ensure_mm_init ( void ) sk_assert(VG_(vg_malloc_redzone_szB) < 128); sk_assert(VG_(vg_malloc_redzone_szB) >= 0); client_rz_szW = VG_(vg_malloc_redzone_szB)/4; - if (client_rz_szW % 2 == 1) client_rz_szW++; arena_init ( &vg_arena[VG_AR_CLIENT], "client", client_rz_szW, False, 262144, True ); diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index a765a78790..30017a4333 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -1808,7 +1808,7 @@ static Int freechunkptr = 0; static HG_Chunk *freechunks[N_FREED_CHUNKS]; /* Use a small redzone (paranoia) */ -UInt VG_(vg_malloc_redzone_szB) = 4; +UInt VG_(vg_malloc_redzone_szB) = 8; /* Allocate a user-chunk of size bytes. Also allocate its shadow