]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove 3 identical and self-admittedly spurious assertions.
authorNicholas Nethercote <n.nethercote@gmail.com>
Wed, 18 Aug 2004 22:26:01 +0000 (22:26 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Wed, 18 Aug 2004 22:26:01 +0000 (22:26 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2592

addrcheck/ac_main.c
helgrind/hg_main.c
memcheck/mc_main.c

index a24ca4a3c42b97c5102e5776d1536e83fe32ff6f..75195eb27c3d1e9f8ad48e82fadfff14a192959c 100644 (file)
@@ -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 */
 
index 5fec88e63313d1fcacddf5f39316bd28105abe84..c14d8d21330626d00995a5908fcfa6d4811c4717 100644 (file)
@@ -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;
 
index c8ecd91fca12430b71e834d24eba203811b9495e..4a8256abf39dc1fddac6480aeaf550b677eb8e4b 100644 (file)
@@ -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++)