Patch for Bug 14072

Vitaliy Margolen wine-devel at kievinfo.com
Wed Jul 16 00:41:21 CDT 2008


Chris Ahrendt wrote:
> I have been chasing down a bug which causes a unhandled exception in
> wine for various d3d applications and have found where the problem occurs.
> 
> The problem occurs in provider.c in dll/dxdiagn
> 
> here is the dif for the patch :
> 
>   --- provider.c    2008-07-15 11:56:57.000000000 -0400
>   +++ provider_orig.c   2008-07-11 11:55:55.000000000 -0400
>   @@ -665,11 +665,7 @@ static HRESULT DXDiag_InitDXDiagDirectSh
>       }
>       IPropertyBag_Release(pPropFilterBag); pPropFilterBag = NULL;
>     }
>   -      if (pEnum != NULL)
>   -        {
>   -       IEnumMoniker_Release(pEnum);
>   -       pEnum = NULL;
>   -      }
>   + IEnumMoniker_Release(pEnum); pEnum = NULL;
>          }
>    class_enum_failed:
>       SysFreeString(wszCatName);
> 
> What's occuring is that pEnum is NULL and when the release function is
> called  it throws an exception. This fix checks to make sure its not
> NULL before calling the release.
> 
> If you need the exception please look at bug 14072
> 
> Chris
> 

Thanks for the patch however there are number of things that are wrong with it:
1. You need to generate patch from the top of the source tree.
2. provider_orig.c goes first not second
3. The patch is not correct - it's hiding an error. The pEnum should not be 
NULL. If it is - something else is really wrong.
4. The crash in your bug has nothing to do with what you are fixing. Unless 
you attached the wrong trace.

Vitaliy.



More information about the wine-devel mailing list