]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Ignore offset information in anonymous mmap calls. Fixes bug #126722.
authorTom Hughes <tom@compton.nu>
Tue, 9 May 2006 09:06:56 +0000 (09:06 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 9 May 2006 09:06:56 +0000 (09:06 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5888

coregrind/m_aspacemgr/aspacemgr.c

index a788fbf8afd42de1628fd0eadcb89878fabcd7ea..6936981bbbe755924fbf0c40b4678d084d831833 100644 (file)
@@ -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;