-
Bug
-
Resolution: Fixed
-
P5
-
2.0
-
b17
-
generic
-
generic
It looks like there's a potential race in
void trace_locking(Mutex* mutex, char *type, char *state) {
where if more than one thread calls it when TraceLocking_lock is
NULL, they will all try to allocate a Mutex and assign it to
TraceLocking_lock. That's race #1. Then whether any given
thread uses the same value for TraceLocking_lock->lock() and
TraceLocking_lock->unlock() is questionable, too.
void trace_locking(Mutex* mutex, char *type, char *state) {
where if more than one thread calls it when TraceLocking_lock is
NULL, they will all try to allocate a Mutex and assign it to
TraceLocking_lock. That's race #1. Then whether any given
thread uses the same value for TraceLocking_lock->lock() and
TraceLocking_lock->unlock() is questionable, too.