apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1561557 - in /apr/apr/branches/1.5.x: ./ shmem/unix/shm.c
Date Sun, 26 Jan 2014 22:04:09 GMT
Author: jim
Date: Sun Jan 26 22:04:09 2014
New Revision: 1561557

URL: http://svn.apache.org/r1561557
Log:
Merge r1561555 from trunk:

Ahh... found a testcase which req's this.
FIX data corruption

Reviewed/backported by: jim

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/shmem/unix/shm.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1561555

Modified: apr/apr/branches/1.5.x/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/shmem/unix/shm.c?rev=1561557&r1=1561556&r2=1561557&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/shmem/unix/shm.c (original)
+++ apr/apr/branches/1.5.x/shmem/unix/shm.c Sun Jan 26 22:04:09 2014
@@ -337,8 +337,7 @@ APR_DECLARE(apr_status_t) apr_shm_create
             shm_unlink(shm_name); /* we're failing, remove the object */
             return status;
         }
-        /* TODO: should we use new_m->realsize instead of reqsize ?? */
-        new_m->base = mmap(NULL, reqsize, PROT_READ | PROT_WRITE,
+        new_m->base = mmap(NULL, new_m->realsize, PROT_READ | PROT_WRITE,
                            MAP_SHARED, tmpfd, 0);
 
         /* FIXME: check for errors */



Mime
View raw message