apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: [PATCH] WIN9x - Apache has caused an error in LIBAPR.DLL
Date Sat, 11 Aug 2001 16:28:10 GMT
On Sat, 11 Aug 2001, Mladen Turk wrote:

> I think that someone noticed that when shutting down the Apache on WIN9x
> platform you get the exclamation error box stating : "Apache has caused an
> error in LIBAPR.DLL ...." ?

I'm amazed that you got Apache to work even that well on Win9x.  I was
under the impression that it was totally fubar at the moment.  <shrug>

> The error is in locks/win32/locks.c lock_cleanup function that gets the NULL
> as a function parameter. I wasn't able to track the source of the call that
> send the NULL value to apr_lock_destroy but here is the patch that checks if
> the function value is NULL and returns not APR_SUCCESS in such a case

-1.  APR does not typically check parameter correctness.  We leave it up
to the caller to give us a parameter that's valid on the assumption that
if they can't manage to do that then they might not check to see if we
gave them an error return code either.  Besides, if they pass in NULL,
it's easier to debug a SEGV than a return value that gets either ignored
or propagated to some time in the future when it's likely harder to figure
out exactly what happened.

Thanks for looking into this, but we need to keep looking for the source
of the NULL parameter rather than bandaiding it.


   Cliff Woolley
   Charlottesville, VA

View raw message