[Bug 39614] New: Wine initialises a Critical Section for Mutexes by NULL instead of (void*)-1

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Nov 18 14:23:11 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=39614

            Bug ID: 39614
           Summary: Wine initialises a Critical Section for Mutexes by
                    NULL instead of (void*)-1
           Product: Wine
           Version: 1.7.55
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ntdll
          Assignee: wine-bugs at winehq.org
          Reporter: EoD at xmw.de
      Distribution: ---

After initialising a critical section for mutexes by using

static CRITICAL_SECTION Mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0};

wine crashed in "RtlpWaitForCriticalSection()".

According to http://locklessinc.com/articles/pthreads_on_windows/ this is a
valid way of initialising the critical section. However, Wine seems to
initialize it by NULL instead of (void*)-1:
http://source.winehq.org/git/wine.git/blob/e8b9bda53ac39c913ddc93de0308f0c8b69605fc:/dlls/ntdll/critsection.c#l323


This is a re-reporting of an issue on github:
https://github.com/apitrace/apitrace/issues/397
with a backtrace in https://gist.github.com/EoD/cf759116a4af8744bdb7

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list