ntdll: Initialize APC call and result variables to suppressvalgrind warnings
Alexandre Julliard
julliard at winehq.org
Tue Dec 11 07:57:45 CST 2007
"Dmitry Timoshkov" <dmitry at codeweavers.com> writes:
> "Alexandre Julliard" <julliard at 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 at winehq.org
More information about the wine-devel
mailing list