]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge, from trunk:
authorJulian Seward <jseward@acm.org>
Mon, 17 Oct 2016 16:15:27 +0000 (16:15 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 17 Oct 2016 16:15:27 +0000 (16:15 +0000)
  16026  mips32: fix the wrong offset for mmap2()

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_12_BRANCH@16050

coregrind/m_syswrap/syswrap-mips32-linux.c

index d75583063a58898b5c9cf4f567764aac6ac62394..b32e4cc77687186b84e25f0bcdbb3507cfc02c22 100644 (file)
@@ -530,7 +530,7 @@ DECL_TEMPLATE (mips_linux, sys_prctl);
 
 PRE(sys_mmap2) 
 {
-  /* Exactly like sys_mmap() except the file offset is specified in pagesize
+  /* Exactly like sys_mmap() except the file offset is specified in 4096 byte 
      units rather than bytes, so that it can be used for files bigger than
      2^32 bytes. */
   SysRes r;
@@ -540,7 +540,7 @@ PRE(sys_mmap2)
                 unsigned long, prot, unsigned long, flags,
                 unsigned long, fd, unsigned long, offset);
   r = mips_PRE_sys_mmap(tid, ARG1, ARG2, ARG3, ARG4, ARG5,
-                        VKI_PAGE_SIZE * (Off64T) ARG6);
+                        4096 * (Off64T) ARG6);
   SET_STATUS_from_SysRes(r);
 }