diff options
author | jackpoz <giacomopoz@gmail.com> | 2013-09-01 18:49:49 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2013-09-01 18:49:49 +0200 |
commit | e1e1067d172f9b1a6ba770ca6ae53a07dbc9d56f (patch) | |
tree | c4538f06a9b2c110efbfdb596024a81dbd078483 /dep/StormLib/src/SFileAddFile.cpp | |
parent | 1501e958767ab0cddc5d501796fdcb63bf98a87c (diff) |
Core/Thread: Fix race condition in FreezeDetectorRunnable
Fix race condition by replacing a static volatile uint32 with proper atomic thread-safe ACE_Atomic_Op<ACE_Thread_Mutex, uint32>, incremented in WorldRunnable::run() at each world loop and read in FreezeDetectorRunnable::run().
Helgrind log:
Possible data race during read of size 4 at 0x2400D54 by thread #12
Locks held: none
at 0x100FEA6: FreezeDetectorRunnable::run() (Master.cpp:106)
by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
by 0x61DAB4F: start_thread (pthread_create.c:304)
by 0x6C69A7C: clone (clone.S:112)
This conflicts with a previous write of size 4 by thread #9
Locks held: none
at 0x100C23E: WorldRunnable::run() (WorldRunnable.cpp:55)
by 0x1637892: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
by 0x518F555: ACE_OS_Thread_Adapter::invoke() (OS_Thread_Adapter.cpp:103)
by 0x4C2B5AD: mythread_wrapper (hg_intercepts.c:219)
by 0x61DAB4F: start_thread (pthread_create.c:304)
by 0x6C69A7C: clone (clone.S:112)
Diffstat (limited to 'dep/StormLib/src/SFileAddFile.cpp')
0 files changed, 0 insertions, 0 deletions