#171 global atomic_mutex_ isn't initialized

closed-fixed
None
6
2011-10-07
2010-05-09
Slav Grig
No

There are definitions LOKI_THREADS_ATOMIC_FUNCTIONS In the file "threads.h". In case of compiling for windows there is a definition of the static variable
static CRITICAL_SECTION atomic_mutex_; \

This variable should be initialized before any using by ::InitializeCriticalSection() method in the Win32 API. But there is no such code. Additionally it should be freed after using by ::DeleteCriticalSection().

The bug is only applied to compilations for windows platform.

Discussion

  • Thanks for reporting the bug. I think it is related to #2892661 - which is also about using atomic_mutex_ on Windows.

    Rich

     
    • priority: 5 --> 6
     
  • Slav Grig
    Slav Grig
    2010-05-12

    Yes, it seems to be the same bug.

     
    • assigned_to: nobody --> rich_sposato
    • status: open --> closed-fixed
     
  • According to my tests, this was fixed in revision 985 when I also fixed bug 1776032.