You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2003/03/12 07:05:11 UTC
[PATCH] get 'shmht' to not dump core
Hi,
I was trying to debug the shmht caching, and got the following SEGV. Thr
problem was also pointed out in
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17864..
I've attached a patch, to fix the problem.
(With this patch, we'll be in sync with the ssl_util_table.c from mod_ssl
for 1.3.x.)
Thanks
-Madhu
Program received signal SIGSEGV, Segmentation fault.
0x6ff62334 in memcpy+0x144 () from /usr/lib/libc.2
(gdb) where
#0 0x6ff62334 in memcpy+0x144 () from /usr/lib/libc.2
#1 0xa6dfc in ssl_scache_shmht_store (s=0x4008fb80,
id=0x4087f8e0
"\310\fZ\3343^\246\320\352\372_\356\235}\302\266\013\r?wfn\261\\q\325\221\03
4\3534\372r", idlen=32, expiry=1047446337, sess=0x4087f898)
at ssl_scache_shmht.c:220
#2 0x9e528 in ssl_scache_store (s=0x4008fb80,
id=0x4087f8e0
"\310\fZ\3343^\246\320\352\372_\356\235}\302\266\013\r?wfn\261\\q\325\221\03
4\3534\372r", idlen=32, expiry=1047446337, sess=0x4087f898)
at ssl_scache.c:129
#3 0x9612c in ssl_callback_NewSessionCacheEntry (ssl=0x4086a1a8,
session=0x4087f898) at ssl_engine_kernel.c:1657
#4 0x1441c8 in ssl_update_cache+0x108 ()
#5 0xa6dfc in ssl_scache_shmht_store (s=Error accessing memory address
0x40000fdc: Bad address.
) at ssl_scache_shmht.c:220
Error accessing memory address 0x40000fec: Bad address.
(gdb) quit
$ cvs diff ssl_util_table.c
Index: ssl_util_table.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_util_table.c,v
retrieving revision 1.8
diff -u -r1.8 ssl_util_table.c
--- ssl_util_table.c 3 Feb 2003 17:53:13 -0000 1.8
+++ ssl_util_table.c 12 Mar 2003 05:47:48 -0000
@@ -989,9 +989,7 @@
*/
int table_clear(table_t * table_p)
{
-#if 0
table_entry_t *entry_p, *next_p;
-#endif
table_entry_t **bucket_p, **bounds_p;
if (table_p == NULL)
@@ -1000,14 +998,12 @@
return TABLE_ERROR_PNT;
/* free the table allocation and table structure */
bounds_p = table_p->ta_buckets + table_p->ta_bucket_n;
- for (bucket_p = table_p->ta_buckets; bucket_p <= bounds_p; bucket_p++)
{
-#if 0
+ for (bucket_p = table_p->ta_buckets; bucket_p < bounds_p; bucket_p++) {
for (entry_p = *bucket_p; entry_p != NULL; entry_p = next_p) {
/* record the next pointer before we free */
next_p = entry_p->te_next_p;
table_p->ta_free(table_p->opt_param, entry_p);
}
-#endif
/* clear the bucket entry after we free its entries */
*bucket_p = NULL;
}
Re: [PATCH] get 'shmht' to not dump core
Posted by Cliff Woolley <jw...@virginia.edu>.
On Tue, 11 Mar 2003, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> I've attached a patch, to fix the problem.
> (With this patch, we'll be in sync with the ssl_util_table.c from mod_ssl
> for 1.3.x.)
++1... by all means commit to 2.1-dev asap. :)