apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <mad...@hp.com>
Subject [PATCH] apr_rmm.c
Date Fri, 18 Apr 2003 01:25:10 GMT
Hi,
	I'm seeing a SIGBUS when I try to get ldap working. The SIGBUS is
obtained at util_ldap_cache_mgr.c:322, where we're trying to initialize the
value of a double variable. The problem happens because the variable address
is in the shared memory at a 4-byte alligned address.

	The following patch solves the problem. With this, ALL the memory
allocation when using apr_rmm is a upper limit of the size of double on the
system. i.e., if we ask for 12 bytes of memory, we allocate 16 bytes => any
memory allocation will automatically be 8-byte alligned.


Index: apr_rmm.c
===================================================================
RCS file: /home/cvspublic/apr-util/misc/apr_rmm.c,v
retrieving revision 1.18
diff -u -r1.18 apr_rmm.c
--- apr_rmm.c   1 Jan 2003 00:02:22 -0000       1.18
+++ apr_rmm.c   18 Apr 2003 01:06:24 -0000
@@ -317,7 +317,7 @@
 }
 
 union grainbit {
-    long l;
+    double d;
     long *pl;
 };

Mime
View raw message