|
From: <sv...@va...> - 2016-10-06 17:46:32
|
Author: petarj
Date: Thu Oct 6 18:46:14 2016
New Revision: 16026
Log:
mips32: fix the wrong offset for mmap2()
The offset for mmap2 is specified in 4096-byte units, not page size
units.
Patch by Duncan Palmer <dp...@di...>.
It fixes BZ#352197.
Modified:
trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-mips32-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-mips32-linux.c Thu Oct 6 18:46:14 2016
@@ -530,7 +530,7 @@
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 @@
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);
}
|