Ignore:
Timestamp:
Sep 25, 2012, 11:55:02 PM (13 years ago)
Author:
dmik
Message:

Disable debug fields of RTL_CRITICAL_SECTION_DEBUG.

Odin uses the DebugInfo ptr in CRITICAL_SECTION for its own purposes
which are incompatible with NT. For this reason any NT-style usage must
be disabled.

This in particular fixes debug assertions and crashes in CRYPT32.DLL (due to
misinterpretation of the structure fields) which happened e.g. during playback of
some Flash content.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/crypt32/oid.c

    r21967 r22020  
    6060static RTL_CRITICAL_SECTION_DEBUG funcSetCSDebug =
    6161{
     62#ifndef __WIN32OS2__
    6263    0, 0, &funcSetCS,
    6364    { &funcSetCSDebug.ProcessLocksList, &funcSetCSDebug.ProcessLocksList },
    6465    0, 0, { (DWORD)(DWORD_PTR)(__FILE__ ": funcSetCS") }
     66#endif
    6567};
    6668static RTL_CRITICAL_SECTION funcSetCS = { &funcSetCSDebug, -1, 0, 0, 0, 0 };
     
    106108            CryptMemFree(functionCursor);
    107109        }
    108 #ifdef DEBUG
     110#ifndef __WIN32OS2__
    109111        setCursor->cs.DebugInfo->Spare[0] = 0;
    110112#endif
     
    143145            {
    144146                InitializeCriticalSection((CRITICAL_SECTION*)&ret->cs);
    145 #ifdef DEBUG
     147#ifndef __WIN32OS2__
    146148                ret->cs.DebugInfo->Spare[0] = (DWORD)(DWORD_PTR)(__FILE__ ": OIDFunctionSet.cs");
    147149#endif
     
    10341036static RTL_CRITICAL_SECTION_DEBUG oidInfoCSDebug =
    10351037{
     1038#ifndef __WIN32OS2__
    10361039    0, 0, &oidInfoCS,
    10371040    { &oidInfoCSDebug.ProcessLocksList, &oidInfoCSDebug.ProcessLocksList },
    10381041    0, 0, { (DWORD)(DWORD_PTR)(__FILE__ ": oidInfoCS") }
     1042#endif
    10391043};
    10401044static RTL_CRITICAL_SECTION oidInfoCS = { &oidInfoCSDebug, -1, 0, 0, 0, 0 };
Note: See TracChangeset for help on using the changeset viewer.