From 3efb1c4ce5ce6e07dd03acddaef9f67f5b07a0dc Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 8 Dec 2010 23:22:53 +0000 Subject: [PATCH] Merge from trunk, r11485 (roundup sizes for shmat) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_6_BRANCH@11487 --- coregrind/m_syswrap/syswrap-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 22eae2891b..623cc82f09 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -1772,7 +1772,7 @@ ML_(generic_POST_sys_shmat) ( ThreadId tid, UWord res, UWord arg0, UWord arg1, UWord arg2 ) { - UInt segmentSize = get_shm_size ( arg0 ); + UInt segmentSize = VG_PGROUNDUP(get_shm_size(arg0)); if ( segmentSize > 0 ) { UInt prot = VKI_PROT_READ|VKI_PROT_WRITE; Bool d; @@ -1789,7 +1789,7 @@ ML_(generic_POST_sys_shmat) ( ThreadId tid, cope with the discrepancy, aspacem's sync checker omits the dev/ino correspondence check in cases where V does not know the dev/ino. */ - d = VG_(am_notify_client_shmat)( res, VG_PGROUNDUP(segmentSize), prot ); + d = VG_(am_notify_client_shmat)( res, segmentSize, prot ); /* we don't distinguish whether it's read-only or * read-write -- it doesn't matter really. */ -- 2.47.2