On Fri, 2 Oct 1998, Ben Laurie wrote:
> From: Ben Laurie <[EMAIL PROTECTED]>
> Subject: Re: gcache session does not expire as requested - bug!
>
> Ralf S. Engelschall wrote:
> > On Thu, Oct 01, 1998, Maert Laak wrote:
> > > In file ssl_gcachecommon.c in subroutine LocalCacheFind (row 189) there
> > > is a static int variable nCalls that _is_not_initialized_? And later
> > > this nCalls is increased and compared to 1. So the results are
> > > unpredictable here?
> > >
> > > I overcome this bug by uncommenting the if-thing there and executing
> > > ExpireCache every time LocalCacheFind is called. This way
> > > SSLSessionCacheTimeout works correctly.
> >
> > Yes, that's a bug. Fixed for mod_ssl 2.0.12. Thanks for the hint.
>
> If it is a bug, it is a bug in the C compiler. Uninitialised static
> variables are guaranteed to be set to zero.
>
> What system was this on? Which compiler?
SCO 3.2v4.2 + GNU gcc 2.7.2.1
If it is initialized to zero so why is this code needed at all:
--- line 194 of ssl_gcachecommon.c of mod_ssl-2.0.11-1.3.2
static int nCalls;
if (++nCalls == 1) {
nCalls = 0;
ExpireCache();
}
---
I see no meaning of this if-thing there at all?
I don't know about the GCC static variable initializing stuff but fact
is that when I uncommented the if clause from there the gcache started
to expire cahce correctly.
Regards,
.m�Rt.
______________________________________________________________________
Apache Interface to SSLeay (mod_ssl) www.engelschall.com/sw/mod_ssl/
Official Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]