You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Tim Costello <tj...@socs.uts.edu.au> on 1998/10/11 03:42:05 UTC
mod_proxy/3178: Access Violation/SEGV in ap_proxy_cache_error
>Number: 3178
>Category: mod_proxy
>Synopsis: Access Violation/SEGV in ap_proxy_cache_error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sat Oct 10 18:50:00 PDT 1998
>Last-Modified:
>Originator: tjcostel@socs.uts.edu.au
>Organization:
apache
>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:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> 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! ]