From: Philippe Waroquiers Date: Wed, 11 Jul 2012 23:06:07 +0000 (+0000) Subject: Fix bug in leak search when an ignore range is specified X-Git-Tag: svn/VALGRIND_3_8_0~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=096ad47ee97eb152e892d918426f0fc2ccb418db;p=thirdparty%2Fvalgrind.git Fix bug in leak search when an ignore range is specified The leak search verifies if an address scanned is in a fully unaddressable secondary map (64 Kb). However, the function checking that wrongly verifies if the address is in an ignore range. So, if the scan encounters one or more bytes in an ignore range, the leak scan will erroneously skip the rest of the 64Kb chunk. The solution is to not test for ignore range in the function MC_(is_within_valid_secondary) : The fact that the address is in an ignore range is in any case verified in the call to MC_(is_valid_aligned_word), which is called for every Word just after. This bug can cause false positive leaks in case small ignore ranges are specified. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12734 --- diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 5c38c4fa60..57055fb75e 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -4644,8 +4644,7 @@ static Int mc_get_or_set_vbits_for_client ( Bool MC_(is_within_valid_secondary) ( Addr a ) { SecMap* sm = maybe_get_secmap_for ( a ); - if (sm == NULL || sm == &sm_distinguished[SM_DIST_NOACCESS] - || MC_(in_ignored_range)(a)) { + if (sm == NULL || sm == &sm_distinguished[SM_DIST_NOACCESS]) { /* Definitely not in use. */ return False; } else {