[PATCH] oleaut32: fixed 64bit crash on tmarshal test

Nikolay Sivov bunglehead at gmail.com
Sat Nov 4 09:57:16 CDT 2017


On 04.11.2017 17:28, Marcus Meissner wrote:
> On Sat, Nov 04, 2017 at 09:51:44AM +0300, Nikolay Sivov wrote:
>> On 03.11.2017 14:15, Marcus Meissner wrote:
>>> Test will fail now, but no longer crash.
>>>
>>> Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
>>> ---
>>>  dlls/oleaut32/tests/tmarshal.c | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
>>> index d2b8dc92d6..f19cbf451b 100644
>>> --- a/dlls/oleaut32/tests/tmarshal.c
>>> +++ b/dlls/oleaut32/tests/tmarshal.c
>>> @@ -2010,7 +2010,8 @@ static void test_external_connection(void)
>>>      todo_wine
>>>      ok(external_connections == 2, "external_connections = %d\n", external_connections);
>>>  
>>> -    ITestSecondDisp_Release(second);
>>> +    if (hres == S_OK) 
>>> +        ITestSecondDisp_Release(second);
>>>      todo_wine
>>>      ok(external_connections == 2, "external_connections = %d\n", external_connections);
>>>  
>>>
>>
>> Any idea why is this specific to 64 bit?
> 
> Well, the call fails in because we have no 64bit typelib threaded marshaller.
> 
> The callchain goes to:
> 
> static HRESULT WINAPI
> PSFacBuf_CreateProxy(
> ...
>     proxy->asmstubs = VirtualAlloc(NULL, sizeof(TMAsmProxy) * nroffuncs, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
>     if (!proxy->asmstubs) {
>         ERR("Could not commit pages for proxy thunks (size %d)\n", sizeof(TMAsmProxy) * nroffuncs);
>         CoTaskMemFree(proxy);
>         return E_OUTOFMEMORY;
>     }
> 
> this fails because the alloc fails due to size 0, because sizeof(TMAsmProxy) is 0, because that is not implemented for 64bit (yet).
> 
> We could exit PSFacBuf_CreateProxy earlier on x86_64 with a different error.
> 
> (or implement the typelib marshaller ;)

Right, there is a fix for that linked from bug
https://bugs.winehq.org/show_bug.cgi?id=26768. It would be nice to have
that for 3.0.

> 
> Ciao, Marcus
> 




More information about the wine-devel mailing list