From: Nicholas Nethercote Date: Tue, 7 Sep 2004 23:15:37 +0000 (+0000) Subject: minor fixes X-Git-Tag: svn/VALGRIND_3_0_0~1610 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2385fed91d9915824e5d5e16b658863097f20cf;p=thirdparty%2Fvalgrind.git minor fixes git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2673 --- diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c index b79b8da310..ef39f73794 100644 --- a/coregrind/vg_mylibc.c +++ b/coregrind/vg_mylibc.c @@ -284,7 +284,7 @@ void* VG_(mmap)( void* start, UInt length, if (flags & VKI_MAP_CLIENT) { vg_assert(VG_(client_base) <= res && res+length < VG_(client_end)); } else { - vg_assert(VG_(valgrind_base) <= res && res+length <= VG_(valgrind_last)); + vg_assert(VG_(valgrind_base) <= res && res+length-1 <= VG_(valgrind_last)); } sf_flags |= SF_MMAP; @@ -1663,7 +1663,7 @@ void* VG_(get_memory_from_mmap) ( Int nBytes, Char* who ) VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS, 0, -1, 0); if (p != ((void*)(-1))) { - vg_assert(p >= (void*)VG_(valgrind_base) && p <= (void*)VG_(valgrind_last)); + vg_assert((void*)VG_(valgrind_base) <= p && p <= (void*)VG_(valgrind_last)); tot_alloc += (UInt)nBytes; if (0) VG_(printf)(