Maert Laak wrote:
> 
> 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 originally intended to expire every so often instead of every time,
but then decided it was a bad idea. That's why this code is now not
there at all in Apache-SSL.

>   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.

Well, that's weird, because I'm pretty sure gcc isn't so broken as to
fail to correctly initialise statics.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: [EMAIL PROTECTED] |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/

WE'RE RECRUITING! http://www.aldigital.co.uk/
______________________________________________________________________
Apache Interface to SSLeay (mod_ssl)   www.engelschall.com/sw/mod_ssl/
Official Support Mailing List               [EMAIL PROTECTED]
Automated List Manager                       [EMAIL PROTECTED]

Reply via email to