On Mon, 14 Nov 2011, Francois Gouget wrote:
[...]
>  static CRITICAL_SECTION                PerfDataCriticalSection;
> +static CRITICAL_SECTION_DEBUG PerfDataCriticalSection_debug  =
> +{
> +    0, 0, &PerfDataCriticalSection,
> +    { &PerfDataCriticalSection_debug.ProcessLocksList, 
> &PerfDataCriticalSection_debug.ProcessLocksList },
> +      0, 0, { (DWORD_PTR)(__FILE__ ": PerfDataCriticalSection") }
> +};
[...]
> +    PerfDataCriticalSection.DebugInfo->Spare[0] = 0;
>      DeleteCriticalSection(&PerfDataCriticalSection);

Actually I think unsetting Spare[0] is wrong for statically initialized 
critical sections because it causes RtlDeleteCriticalSection() to do an 
RtlFreeHeap() on DebugInfo which happens to also be statically 
allocated. So I'll rework this patch and some of my previous patches.

-- 
Francois Gouget <fgou...@codeweavers.com>


Reply via email to