From: Nicholas Nethercote Date: Wed, 18 Aug 2004 22:26:01 +0000 (+0000) Subject: Remove 3 identical and self-admittedly spurious assertions. X-Git-Tag: svn/VALGRIND_2_2_0~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=841b4ec9ae203245a1866c80d804ae49644a9b1d;p=thirdparty%2Fvalgrind.git Remove 3 identical and self-admittedly spurious assertions. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2592 --- diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c index a24ca4a3c4..75195eb27c 100644 --- a/addrcheck/ac_main.c +++ b/addrcheck/ac_main.c @@ -184,13 +184,7 @@ static AcSecMap* alloc_secondary_map ( __attribute__ ((unused)) PROF_EVENT(10); /* Mark all bytes as invalid access and invalid value. */ - - /* It just happens that a AcSecMap occupies exactly 18 pages -- - although this isn't important, so the following assert is - spurious. */ - sk_assert(0 == (sizeof(AcSecMap) % VKI_BYTES_PER_PAGE)); map = (AcSecMap *)VG_(shadow_alloc)(sizeof(AcSecMap)); - for (i = 0; i < 8192; i++) map->abits[i] = VGM_BYTE_INVALID; /* Invalid address */ diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 5fec88e633..c14d8d2133 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -492,12 +492,8 @@ ESecMap* alloc_secondary_map ( __attribute__ ((unused)) Char* caller ) UInt i; //PROF_EVENT(10); PPP - /* It just happens that a SecMap occupies exactly 18 pages -- - although this isn't important, so the following assert is - spurious. (SSS: not true for ESecMaps -- they're 16 pages) */ - sk_assert(0 == (sizeof(ESecMap) % VKI_BYTES_PER_PAGE)); + // Mark all words as virgin. map = (ESecMap *)VG_(shadow_alloc)(sizeof(ESecMap)); - for (i = 0; i < ESEC_MAP_WORDS; i++) map->swords[i] = virgin_sword; diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index c8ecd91fca..4a8256abf3 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -149,11 +149,6 @@ static SecMap* alloc_secondary_map ( __attribute__ ((unused)) PROF_EVENT(10); /* Mark all bytes as invalid access and invalid value. */ - - /* It just happens that a SecMap occupies exactly 18 pages -- - although this isn't important, so the following assert is - spurious. */ - sk_assert(0 == (sizeof(SecMap) % VKI_BYTES_PER_PAGE)); map = (SecMap *)VG_(shadow_alloc)(sizeof(SecMap)); for (i = 0; i < 8192; i++)