[PATCH 1/2] server: Store async list in process object and use that to find async in cansel_async request.

Alexandre Julliard julliard at winehq.org
Thu Dec 1 05:52:47 CST 2016


Jacek Caban <jacek at codeweavers.com> writes:

> On 30.11.2016 16:27, Alexandre Julliard wrote:
>> Jacek Caban <jacek at codeweavers.com> writes:
>>
>>> @@ -614,6 +615,7 @@ static void process_destroy( struct object *obj )
>>>  
>>>      /* we can't have a thread remaining */
>>>      assert( list_empty( &process->thread_list ));
>>> +    assert( list_empty( &process->asyncs ));
>> I don't think that this is guaranteed, I believe that there can still be
>> asyncs in the queues of shared files.
>
> I think it is guaranteed. async object holds thread reference and thread
> object holds process reference, so process object will not be destroyed
> until all its asyncs are released. Asyncs in queues of shared objects
> will keep process object alive (and they shouldn't), but it's not new
> with my patch. Am I missing something?

No, you're right, it's holding a thread reference so it's safe. This is
of course a leak, but it's not a new issue.

>> We'd probably need to clear them explicitly at process exit.
>
> I agree that we should. I will send a new series implementing that. I
> tested that with the attached patch (I can't send it to wine-patches yet
> because it uses pipes in message mode).

Thread exit would be interesting to test too.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list