You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2002/02/04 20:33:38 UTC
cvs commit: apr/shmem/unix shm.c
trawick 02/02/04 11:33:38
Modified: . CHANGES
shmem/unix shm.c
Log:
Fix a few attempts to add to a void *ptr in the Unix shared memory
code.
PR: 9710
Submitted by: Per Ekman [pek@pdc.kth.se]
Reviewed by: Jeff Trawick, who expanded Per's fix to a couple of
more places (so all breakage is mine :) )
Revision Changes Path
1.216 +4 -1 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -r1.215 -r1.216
--- CHANGES 4 Feb 2002 19:21:16 -0000 1.215
+++ CHANGES 4 Feb 2002 19:33:38 -0000 1.216
@@ -1,8 +1,11 @@
Changes with APR b1
+ *) Fix a few attempts to add to a void * ptr in the Unix shared
+ memory support code. PR #9710 Per Ekman [pek@pdc.kth.se]
+
*) In the Linux apr_sendfile(), fix the types of some parameters
to apr_send() and apr_recv(). Breakage was seen in 64-bit mode
- on s/390. [Neale.Ferguson@SoftwareAG-usa.coom]
+ on s/390. PR #9712 [Neale.Ferguson@SoftwareAG-usa.coom]
*) added APR_PROGRAM_ENV and APR_PROGRAM_PATH options for starting
processes via apr_proc_create() [Greg Stein]
1.13 +3 -3 apr/shmem/unix/shm.c
Index: shm.c
===================================================================
RCS file: /home/cvs/apr/shmem/unix/shm.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- shm.c 30 Jan 2002 15:33:14 -0000 1.12
+++ shm.c 4 Feb 2002 19:33:38 -0000 1.13
@@ -189,7 +189,7 @@
/* store the real size in the metadata */
*(apr_size_t*)(new_m->base) = new_m->realsize;
/* metadata isn't usable */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
apr_pool_cleanup_null);
@@ -345,7 +345,7 @@
/* store the real size in the metadata */
*(apr_size_t*)(new_m->base) = new_m->realsize;
/* metadata isn't usable */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
apr_pool_cleanup_null);
@@ -508,7 +508,7 @@
}
/* metadata isn't part of the usable segment */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_attach,
apr_pool_cleanup_null);