Re: ntdll: Initialize APC call and result variables to suppress valgrind warnings
Dmitry Timoshkov <dmitry(a)codeweavers.com> writes:
Alexandre said that it's OK to use memset for server requests because of backwards compatibility.
It's OK for requests, but why do you want to initialize the result structure too? -- Alexandre Julliard julliard(a)winehq.org
"Alexandre Julliard" <julliard(a)winehq.org> wrote:
It's OK for requests, but why do you want to initialize the result structure too?
NTDLL_queue_process_apc for a local process calls invoke_apc() which initializes the result to 0 before proceeding. Perhaps memset() should be added for a not local case as well, or memset() should be removed from invoke_apc() and replaced by explicit initialization as done in my patch. What's your opinion? -- Dmitry.
"Dmitry Timoshkov" <dmitry(a)codeweavers.com> writes:
"Alexandre Julliard" <julliard(a)winehq.org> wrote:
It's OK for requests, but why do you want to initialize the result structure too?
NTDLL_queue_process_apc for a local process calls invoke_apc() which initializes the result to 0 before proceeding. Perhaps memset() should be added for a not local case as well, or memset() should be removed from invoke_apc() and replaced by explicit initialization as done in my patch. What's your opinion?
In the local case there's no server call, so there's no need for a memset. In the remote case there's a need for a memset in the target process, i.e. in invoke_apc. A memset in the source process is always useless since it never sends the result anywhere. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Dmitry Timoshkov