]> sourceware.org Git - newlib-cygwin.git/commitdiff
* mmap.cc (msync): Disable rounding up len. Fix bug in access check
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 19 Jul 2006 08:58:09 +0000 (08:58 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 19 Jul 2006 08:58:09 +0000 (08:58 +0000)
loop.

winsup/cygwin/ChangeLog
winsup/cygwin/mmap.cc

index 777e1af994ed1cf4a6e883f01450d8ae218d4206..765e5d23e32623c93a35bc87c938d123c5b232af 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-19  Corinna Vinschen  <corinna@vinschen.de>
+
+       * mmap.cc (msync): Disable rounding up len.  Fix bug in access check
+       loop.
+
 2006-07-19  Corinna Vinschen  <corinna@vinschen.de>
 
        * path.cc (symlink_worker): Return EEXIST if newpath exists.
index 5ace55c0a1dfc76ad25d6c969fb1914066671c3e..97966515eeb3a11d9c239afab49e5836ba1763d0 100644 (file)
@@ -1352,7 +1352,9 @@ msync (void *addr, size_t len, int flags)
       set_errno (EINVAL);
       goto out;
     }
+#if 0 /* If I only knew why I did that... */
   len = roundup2 (len, pagesize);
+#endif
 
   /* Iterate through the map, looking for the mmapped area.
      Error if not found. */
@@ -1368,7 +1370,7 @@ msync (void *addr, size_t len, int flags)
          if (rec->access ((caddr_t)addr))
            {
              /* Check whole area given by len. */
-             for (DWORD i = getpagesize (); i < len; ++i)
+             for (DWORD i = getpagesize (); i < len; i += getpagesize ())
                if (!rec->access ((caddr_t)addr + i))
                  {
                    set_errno (ENOMEM);
This page took 0.032414 seconds and 5 git commands to generate.