From 7ea1789a9710d4bda239b39afc7c3c16b5efe6b7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 9 May 2006 09:06:56 +0000 Subject: [PATCH] Ignore offset information in anonymous mmap calls. Fixes bug #126722. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5888 --- coregrind/m_aspacemgr/aspacemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2