From: Tom Hughes Date: Tue, 9 May 2006 09:06:56 +0000 (+0000) Subject: Ignore offset information in anonymous mmap calls. Fixes bug #126722. X-Git-Tag: svn/VALGRIND_3_2_0~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ea1789a9710d4bda239b39afc7c3c16b5efe6b7;p=thirdparty%2Fvalgrind.git Ignore offset information in anonymous mmap calls. Fixes bug #126722. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5888 --- diff --git a/coregrind/m_aspacemgr/aspacemgr.c b/coregrind/m_aspacemgr/aspacemgr.c index a788fbf8af..6936981bbb 100644 --- a/coregrind/m_aspacemgr/aspacemgr.c +++ b/coregrind/m_aspacemgr/aspacemgr.c @@ -2104,11 +2104,11 @@ VG_(am_notify_client_mmap)( Addr a, SizeT len, UInt prot, UInt flags, seg.kind = (flags & VKI_MAP_ANONYMOUS) ? SkAnonC : SkFileC; seg.start = a; seg.end = a + len - 1; - seg.offset = offset; seg.hasR = toBool(prot & VKI_PROT_READ); seg.hasW = toBool(prot & VKI_PROT_WRITE); seg.hasX = toBool(prot & VKI_PROT_EXEC); if (!(flags & VKI_MAP_ANONYMOUS)) { + seg.offset = offset; if (get_inode_for_fd(fd, &dev, &ino, &mode)) { seg.dev = dev; seg.ino = ino;