Received: (qmail 14122 invoked by uid 2012); 11 Oct 1998 01:42:05 -0000 Message-Id: <19981011014205.14121.qmail@hyperreal.org> Date: 11 Oct 1998 01:42:05 -0000 From: Tim Costello Reply-To: tjcostel@socs.uts.edu.au To: apbugs@hyperreal.org Subject: Access Violation/SEGV in ap_proxy_cache_error X-Send-Pr-Version: 3.2 >Number: 3178 >Category: mod_proxy >Synopsis: Access Violation/SEGV in ap_proxy_cache_error >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Sat Oct 10 18:50:00 PDT 1998 >Last-Modified: Sat May 1 10:03:49 PDT 1999 >Originator: tjcostel@socs.uts.edu.au >Organization: >Release: 1.3.3 >Environment: Win NT 4.0 Intel, SP3 MS Visual C++ 5.0 SP3 >Description: WinNT crashed before I could get a backtrace (!), but the function at fault was ap_proxy_cache_error. It crashed because c->fp was a null pointer, ie c != NULL but c->fp == NULL. This seems very similar to the case in PR2950. cache_req *ap_proxy_cache_error(cache_req *c) { ap_log_rerror(APLOG_MARK, APLOG_ERR, c->req, "proxy: error writing to cache file %s", c->tempfile); /* CRASH ON NEXT LINE, c->fp == NULL */ ap_pclosef(c->req->pool, c->fp->fd); c->fp = NULL; unlink(c->tempfile); return NULL; } >How-To-Repeat: *Very* intermittent - only happens about every 50Mb of data that goes through the proxy >Fix: cache_req *ap_proxy_cache_error(cache_req *c) { if (c != NULL) { ap_log_rerror(APLOG_MARK, APLOG_ERR, c->req, "proxy: error writing to cache file %s", c->tempfile); if (c->fp != NULL) { ap_pclosef(c->req->pool, c->fp->fd); c->fp = NULL; } unlink(c->tempfile); } return NULL; } >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Sat May 1 10:03:48 PDT 1999 State-Changed-Why: A patch has been committed to 1.3.7, thanks. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]