Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 5549 invoked by uid 6000); 22 Jul 1998 14:55:53 -0000 Received: (qmail 5512 invoked from network); 22 Jul 1998 14:55:42 -0000 Received: from silk.apana.org.au (root@202.12.87.81) by taz.hyperreal.org with SMTP; 22 Jul 1998 14:55:42 -0000 Received: from kheldar.apana.org.au (bjh@kheldar.apana.org.au [202.12.87.82]) by silk.apana.org.au (8.8.7/8.8.7) with SMTP id AAA05876 for ; Thu, 23 Jul 1998 00:53:48 +1000 Message-Id: <199807221453.AAA05876@silk.apana.org.au> From: "Brian Havard" To: "Apache Developers Mailing List" Date: Thu, 23 Jul 1998 00:53:48 +1000 X-Mailer: PMMail 1.96 For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: [PATCH] PR#2395 coredump if proxy-cache is disabled Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org I've found the location that triggers the core dump described in ap_proxy_cache_update() (in proxy_cache.c). It has determined that the object isn't cacheable and decideds to unlink the related cache file. The problem seems to be that as caching is disabled (no CacheRoot) there is no file so the file name is NULL. The core dump comes from passing NULL to unlink(). The following patch stops the core dumps but I get the feeling that it shouldn't have even reached the function ap_proxy_cache_update() if no caching is going on. I don't know the proxy module well enough to determine what needs to be fixed though, or why it only seems to happen in OS/2. Does unix accept unlink(NULL) as a no-op? Index: proxy_cache.c =================================================================== RCS file: /cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v retrieving revision 1.46 diff -u -r1.46 proxy_cache.c --- proxy_cache.c 1998/07/09 19:45:56 1.46 +++ proxy_cache.c 1998/07/22 14:49:36 @@ -846,7 +846,8 @@ c->fp = NULL; } /* delete the previously cached file */ - unlink(c->filename); + if (c->filename) + unlink(c->filename); return DECLINED; /* send data to client but not cache */ } -- ______________________________________________________________________________ | Brian Havard | "He is not the messiah! | | brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian | ------------------------------------------------------------------------------