]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from trunk, r11485 (roundup sizes for shmat)
authorNicholas Nethercote <njn@valgrind.org>
Wed, 8 Dec 2010 23:22:53 +0000 (23:22 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 8 Dec 2010 23:22:53 +0000 (23:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_6_BRANCH@11487

coregrind/m_syswrap/syswrap-generic.c

index 22eae2891b5b4e5e60fcc15b992a25172025a1f4..623cc82f0959ba647cbc40ffba7e10a6aa9faf70 100644 (file)
@@ -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. */