apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C K Tan <ck...@nxscientific.com>
Subject [PATCH] apr win32 thread_cond
Date Tue, 28 Oct 2003 06:36:07 GMT
I ran into a race condition on Win32 with the attached test program 
(pc.c). Looking at thread_cond.c, it became obvious where where this 
could happen:

1. on line 96, apr_thread_mutex_unlock can be called multiple times 
without corresponding lock operation (if the while loop executes more 
than once).
2. on line 101 & 115, the ReleaseMutex calls do not have the prior lock 
mutex.

I have not fixed apr_thread_cond_broadcast() which has the same bugs.

Also, apr_thread_cond_create does not register thread_cond_cleanup as 
was done by the unix version.

Regards,
-cktan



Mime
View raw message