Re: ol32: Make enumx implementation look more like a COM interface.

2013-06-23 Thread Dmitry Timoshkov
This patch should be quite obvious in its intent: it changes vtable type
to IUnknown which helps to remove This* to IUnknown* casts in order to
avoid obvious problems with vtable pointer placement inside of object
implementation. Basically this is just a clean up patch.

Is there anything else to clear the pending patch state?

-- 
Dmitry.




Patch 96965

2013-06-23 Thread Christian Costa

Hi,

This patch http://source.winehq.org/patches/data/96965 is in the pending 
state.

Is there anything wrong or missing.
Basically this patch only changes the test to check exactly the returned 
value to show the difference in behaviour between A and Version of the 
API. The rest is just to things to make this difference clearer.





Re: [PATCH] ole32: LeaveCriticalSection in one exit case (Coverity)

2013-06-23 Thread Dmitry Timoshkov
Marcus Meissner  wrote:

> > > --- a/dlls/ole32/ifs.c
> > > +++ b/dlls/ole32/ifs.c
> > > @@ -217,6 +217,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC 
> > > iface,LPVOID pv,DWORD cb) {
> > >   IMallocSpy_Release(Malloc32.pSpy);
> > >   Malloc32.SpyReleasePending = FALSE;
> > >   Malloc32.pSpy = NULL;
> > > + /* cb == 0 case will release it some lines below. */
> > > + if (cb) LeaveCriticalSection(&IMalloc32_SpyCS);
> > >   }
> > >  
> > >   if (0==cb) {
> > 
> > Why not unconditionally release the lock before the '0==cb' check?
> 
> That would cause LeaveCriticalSection be called twice with a race window 
> inbetween.

Of course you'd need to remove a redundant LeaveCriticalSection under
'if (0==cb)' case, and I don't see a race there.

-- 
Dmitry.




Re: [PATCH] ole32: LeaveCriticalSection in one exit case (Coverity)

2013-06-23 Thread Marcus Meissner
On Sun, Jun 23, 2013 at 07:15:43PM +0900, Dmitry Timoshkov wrote:
> Marcus Meissner  wrote:
> 
> > --- a/dlls/ole32/ifs.c
> > +++ b/dlls/ole32/ifs.c
> > @@ -217,6 +217,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC 
> > iface,LPVOID pv,DWORD cb) {
> > IMallocSpy_Release(Malloc32.pSpy);
> > Malloc32.SpyReleasePending = FALSE;
> > Malloc32.pSpy = NULL;
> > +   /* cb == 0 case will release it some lines below. */
> > +   if (cb) LeaveCriticalSection(&IMalloc32_SpyCS);
> > }
> >  
> > if (0==cb) {
> 
> Why not unconditionally release the lock before the '0==cb' check?

That would cause LeaveCriticalSection be called twice with a race window 
inbetween.

CIao, Marcus




Re: [PATCH] ole32: LeaveCriticalSection in one exit case (Coverity)

2013-06-23 Thread Dmitry Timoshkov
Marcus Meissner  wrote:

> --- a/dlls/ole32/ifs.c
> +++ b/dlls/ole32/ifs.c
> @@ -217,6 +217,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC 
> iface,LPVOID pv,DWORD cb) {
>   IMallocSpy_Release(Malloc32.pSpy);
>   Malloc32.SpyReleasePending = FALSE;
>   Malloc32.pSpy = NULL;
> + /* cb == 0 case will release it some lines below. */
> + if (cb) LeaveCriticalSection(&IMalloc32_SpyCS);
>   }
>  
>   if (0==cb) {

Why not unconditionally release the lock before the '0==cb' check?

-- 
Dmitry.