On 01.08.2017 18:29, Jacek Caban wrote:
> +static void WINAPI getaddrinfo_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_WORK *work)
> +{
> + struct getaddrinfo_args *args = context;
> + OVERLAPPED *overlapped = args->overlapped;
> + struct WS_addrinfo *res;
> +
> + overlapped->Internal = WS_getaddrinfo(args->nodename, args->servname, NULL, &res);
What if the app does busy-looping instead of using the event, and expects the result to
be set after overlapped->Internal changed?
My understanding is that setting overlapped->Internal should be the very last thing in
the function, the app could decide to deallocate / reuse the memory after the async
operation has finished.
> + if (res)
> + {
> + *args->result = addrinfo_list_AtoW(res);
> + overlapped->u.Pointer = args->result;
> + WS_freeaddrinfo(res);
> + }
>[...]
> + tp_work = CreateThreadpoolWork(getaddrinfo_callback, args, NULL);
> + if (!tp_work)
> + {
> + HeapFree(GetProcessHeap(), 0, args);
> + ret = GetLastError();
> + goto end;
> + }
>
> + overlapped->Internal = WSAEINPROGRESS;
> + SubmitThreadpoolWork(tp_work);
I don't see a CloseThreadpoolWork call or cleanup group anywhere, so there is likely a
leak in this code. Also, when all callbacks have different arguments, it would be better
to use TrySubmitThreadpoolCallback(). Work callbacks are typically used when the same
task is queued multiple times.
> + if (local_nodenameW != nodename)
> + HeapFree(GetProcessHeap(), 0, local_nodenameW);
> + WSASetLastError(ERROR_IO_PENDING);
> + return ERROR_IO_PENDING;
> + }
> +
> + ret = WS_getaddrinfo(nodenameA, servnameA, hints, &resA);
Hi Zebediah,
On 01/08/17 05:24, Zebediah Figura wrote:
> v2: fix a typo in MSDN
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> +cpp_quote("DEFINE_GUID(CLSID_CommonQuery, 0x83BC5EC0, 0x6F2A, 0x11D0, 0xA1,0xC4, 0x00,0xAA,0x00,0xC1,0x6E,0x65);")
>
Please make the GUID lowercase.
Best Regards
Alistair
Hi Zebediah,
On 01/08/17 05:24, Zebediah Figura wrote:
> v2: fix a typo in MSDN
> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
> +cpp_quote("DEFINE_GUID(CLSID_CommonQuery, 0x83BC5EC0, 0x6F2A, 0x11D0, 0xA1,0xC4, 0x00,0xAA,0x00,0xC1,0x6E,0x65);")
>
Please make the GUID lowercase.
Best Regards
Alistair
On 31-07-2017 18:50, Alexandre Julliard wrote:
> Carlos Palminha <CARLOS.PALMINHA(a)synopsys.com> writes:
>
>> On 31-07-2017 17:54, Alexandre Julliard wrote:
>>> Carlos Palminha <CARLOS.PALMINHA(a)synopsys.com> writes:
>>>
>>>> Hi Alexandre,
>>>>
>>>> I tested with iTunes installation that was crashing when calling load_libraryin my system. After the patch it was ok. Probably not enough indicator that was working properly in all systems.
>>>>
>>>> I will send a second version calling GetWindowsDirectory instead of using %windows%.
>>>>
>>>> Regarding the other cases, when using the flag
>>>> LOAD_LIBRARY_SEARCH_SYSTEM32, directories in the standard search path
>>>> are not searched and the value cannot be combined with
>>>> LOAD_WITH_ALTERED_SEARCH_PATH. The search path is reduced to
>>>> windows\system32, right? Or probably i need to append
>>>> %windows&\system32 to the existing path...
>>>
>>> If you only specify SEARCH_SYSTEM32 the path is reduced to that, but you
>>> could also have other flags like SEARCH_APPLICATION_DIR,
>>> SEARCH_DLL_LOAD_DIR, etc. You can't handle just one flag and ignore the
>>> others.
>>>
>>
>> All the other cases SEARCH_APPLICATION_DIR, SEARCH_DEFAULT_DIRS, SEARCH_DLL_LOAD_DIR and SEARCH_USER_DIRS are not yet supported (unsopported flags).
>> So at this moment LOAD_LIBRARY_SEARCH_* are reduced to ALTERED_SEARCH_PATH or SEARCH_SYSTEM32.
>
> They are not supported now, but if you add one you have to add the
> others, otherwise dlls are going to fail to load because you are
> searching only system32.
>
I think today its working for some of those unsupported flags because it's a side effect of calling MODULE_get_dll_load_path with NULL.
Probably using only system32 path it might break some of the application that are working based on a side effect. Nevertheless i run the existing tests for module and its ok.
I will look at it and add the other SEARCH flags. If i check the other flags then there is no need to fallback to MODULE_get_dll_load_path(NULL), do you agree?
Regards,
C.Palminha
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=32534
Your paranoid android.
=== wvistau64 (64 bit misc) ===
misc.c:691: Test failed: log2(-1.#INF00) got exception type 1
misc.c:691: Test failed: log2(-1.000000) got exception type 1
misc.c:691: Test failed: log2(0.000000) got exception type 2
misc.c:721: Test failed: _scalb(1.000000, -1000000000) got exception type -1
=== w1064 (64 bit misc) ===
misc.c:691: Test failed: log2(-1.#INF00) got exception type 1
misc.c:691: Test failed: log2(-1.000000) got exception type 1
misc.c:691: Test failed: log2(0.000000) got exception type 2
misc.c:721: Test failed: _scalb(1.000000, -1000000000) got exception type -1