httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Min Xu ...@cs.wisc.edu>
Subject race in mod_unique_id.c?
Date Wed, 03 Mar 2004 17:14:56 GMT
Hi There,

I am running apache 2.0.48 and I noticed sometimes multiple threads 
could access the counter "cur_unique_id.counter" without proper 
synchronization.

In more details, an automatic tool I developed found after one thread 
write the counter at line 389:

cur_unique_id.counter = htons(counter);

another thread could read the same counter at line 347:

new_unique_id.counter = cur_unique_id.counter;

And in between of these two accesses no synchronizations are observed.

Could this be a bug, or it is an correct behavior?

Thanks for any inputs!

-Min

Mime
View raw message