[Pkg-openssl-devel] Bug#534892: False positive ?

Scott Schaefer saschaefer at neurodiverse.org
Tue May 17 01:40:21 UTC 2011


I am a bit confused...  I am certainly no Helgrind expert, and I will 
concede that it may
know more about C than I do.  However, this certainly appears to me to 
be a false positive.

The variable err_fns is declared as:
static const ERR_FNS *err_fns = NULL;

Your subject line states "err_fns_check() has a race if a pointer 
assignment is not
atomic".  Except, because the assignment is inside of 
CRYPTO_w_lock(),CRYPTO_w_unlock(),
no race condition exists (assuming these two functions are implemented 
correctly).

In the body you state "Helgrind flags the function ... due to there 
being no lock on the
first check of err_fns".  However, this is a test and return.  What 
possible
reason is there for requiring a lock on the test ?








More information about the Pkg-openssl-devel mailing list