Changeset 22020 for trunk/src


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.

Location:
trunk/src
Files:
7 edited

Legend:

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

    r21967 r22020  
    4242{
    4343    WINECRYPT_CERTSTORE hdr;
    44     /*CRITICAL_SECTION*/RTL_CRITICAL_SECTION    cs;
     44    RTL_CRITICAL_SECTION cs;
    4545    struct list         stores;
    4646} WINE_COLLECTIONSTORE, *PWINE_COLLECTIONSTORE;
     
    6060        CryptMemFree(entry);
    6161    }
    62 #ifdef DEBUG
     62#ifndef __WIN32OS2__
    6363    cs->cs.DebugInfo->Spare[0] = 0;
    6464#endif
     
    455455            store->hdr.ctls.deleteContext  = CRYPT_CollectionDeleteCTL;
    456456            InitializeCriticalSection((CRITICAL_SECTION*)&store->cs);
    457 #ifdef DEBUG
     457#ifndef __WIN32OS2__
    458458            store->cs.DebugInfo->Spare[0] = (DWORD)(DWORD_PTR)(__FILE__ ": PWINE_COLLECTIONSTORE->cs");
    459459#endif
  • trunk/src/crypt32/context.c

    r21967 r22020  
    198198        list->contextSize = contextSize;
    199199        InitializeCriticalSection((CRITICAL_SECTION*)&list->cs);
    200 #ifdef DEBUG
     200#ifndef __WIN32OS2__
    201201        list->cs.DebugInfo->Spare[0] = (DWORD)(DWORD_PTR)(__FILE__ ": ContextList.cs");
    202202#endif
     
    312312{
    313313    ContextList_Empty(list);
    314 #ifdef DEBUG
     314#ifndef __WIN32OS2__
    315315    list->cs.DebugInfo->Spare[0] = 0;
    316316#endif
  • 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 };
  • trunk/src/crypt32/proplist.c

    r21967 r22020  
    4949    {
    5050        InitializeCriticalSection((CRITICAL_SECTION*)&list->cs);
    51 #if DEBUG
     51#ifndef __WIN32OS2__
    5252        list->cs.DebugInfo->Spare[0] = (DWORD)(DWORD_PTR)(__FILE__ ": PCONTEXT_PROPERTY_LIST->cs");
    5353#endif
     
    6868        CryptMemFree(prop);
    6969    }
    70 #if DEBUG
     70#ifndef __WIN32OS2__
    7171    list->cs.DebugInfo->Spare[0] = 0;
    7272#endif
  • trunk/src/crypt32/regstore.c

    r21967 r22020  
    328328    CRYPT_RegFlushStore(store, FALSE);
    329329    RegCloseKey(store->key);
    330 #ifdef DEBUG
     330#ifndef __WIN32OS2__
    331331    store->cs.DebugInfo->Spare[0] = 0;
    332332#endif
     
    551551                    regInfo->key = key;
    552552                    InitializeCriticalSection((CRITICAL_SECTION*)&regInfo->cs);
    553 #ifdef DEBUG
     553#ifndef __WIN32OS2__
    554554                    regInfo->cs.DebugInfo->Spare[0] = (DWORD)(DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs");
    555555#endif
  • trunk/src/crypt32/sip.c

    r21354 r22020  
    570570static RTL_CRITICAL_SECTION_DEBUG providers_cs_debug =
    571571{
     572#ifndef __WIN32OS2__
    572573    0, 0, &providers_cs,
    573574    { &providers_cs_debug.ProcessLocksList,
    574575    &providers_cs_debug.ProcessLocksList },
    575576    0, 0, { (DWORD)(DWORD_PTR)(__FILE__ ": providers_cs") }
     577#endif
    576578};
    577579static RTL_CRITICAL_SECTION providers_cs = { &providers_cs_debug, -1, 0, 0, 0, 0 };
  • trunk/src/ole32/ifs.c

    r21916 r22020  
    3434
    3535#include "wine/debug.h"
    36 
    37 #ifdef __WIN32OS2__
    38 #define CRITICAL_SECTION_INIT(name) { (void *)(__FILE__ ": " name), -1, 0, 0, 0, 0 }
    39 #endif
    4036
    4137WINE_DEFAULT_DEBUG_CHANNEL(ole);
Note: See TracChangeset for help on using the changeset viewer.