Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 96938 invoked from network); 23 Sep 2010 05:43:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Sep 2010 05:43:59 -0000 Received: (qmail 24887 invoked by uid 500); 23 Sep 2010 05:43:58 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 24624 invoked by uid 500); 23 Sep 2010 05:43:55 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 24616 invoked by uid 99); 23 Sep 2010 05:43:54 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 05:43:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Sep 2010 05:43:37 +0000 Received: (qmail 96878 invoked by uid 2161); 23 Sep 2010 05:43:15 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by euler.heimnetz.de (Postfix) with ESMTP id 76A1F24044 for ; Thu, 23 Sep 2010 07:44:25 +0200 (CEST) Message-ID: <4C9AE939.20204@apache.org> Date: Thu, 23 Sep 2010 07:44:25 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100301 SeaMonkey/1.1.19 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r1000247 - in /httpd/httpd/trunk/modules/cache: cache_storage.c cache_storage.h cache_util.c cache_util.h mod_cache.h References: <20100922213538.EC76623888E8@eris.apache.org> In-Reply-To: <20100922213538.EC76623888E8@eris.apache.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/22/2010 11:35 PM, minfrin@apache.org wrote: > Author: minfrin > Date: Wed Sep 22 21:35:38 2010 > New Revision: 1000247 > > URL: http://svn.apache.org/viewvc?rev=1000247&view=rev > Log: > Make cache_provider_list and cache_request_rec private by moving them > out of mod_cache.h. > > Modified: > httpd/httpd/trunk/modules/cache/cache_storage.c > httpd/httpd/trunk/modules/cache/cache_storage.h > httpd/httpd/trunk/modules/cache/cache_util.c > httpd/httpd/trunk/modules/cache/cache_util.h > httpd/httpd/trunk/modules/cache/mod_cache.h > > Modified: httpd/httpd/trunk/modules/cache/cache_storage.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_storage.c?rev=1000247&r1=1000246&r2=1000247&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/cache/cache_storage.c (original) > +++ httpd/httpd/trunk/modules/cache/cache_storage.c Wed Sep 22 21:35:38 2010 > @@ -74,10 +74,18 @@ int cache_create_entity(cache_request_re > { > cache_provider_list *list; > cache_handle_t *h = apr_pcalloc(r->pool, sizeof(cache_handle_t)); > - char *key; > apr_status_t rv; > > - rv = cache_generate_key(cache, r, r->pool, &key); > + if (!cache) { > + /* This should never happen */ > + ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server, > + "cache: No cache request information available for key" > + " generation"); > + cache->key = ""; This creates a Segfault. We know that cache == NULL. > + return APR_EGENERAL; > + } > + > + rv = cache_generate_key(r, r->pool, &cache->key); > if (rv != APR_SUCCESS) { > return rv; > } > @@ -191,9 +199,17 @@ int cache_select(cache_request_rec *cach > cache_provider_list *list; > apr_status_t rv; > cache_handle_t *h; > - char *key; > > - rv = cache_generate_key(cache, r, r->pool, &key); > + if (!cache) { > + /* This should never happen */ > + ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server, > + "cache: No cache request information available for key" > + " generation"); > + cache->key = ""; This creates a Segfault. We know that cache == NULL. > + return APR_EGENERAL; > + } > + > + rv = cache_generate_key(r, r->pool, &cache->key); > if (rv != APR_SUCCESS) { > return rv; > } Regards RĂ¼diger