[PATCH] ntdll: Workaround for requesting thread affinity mask that isn't a subset of the system's mask

Dmitry Timoshkov dmitry at baikal.ru
Sun Sep 9 03:07:23 CDT 2018


Roger Zoellner <zoellner.roger at gmail.com> wrote:


> @@ -1290,6 +1290,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
>              if (length != sizeof(ULONG_PTR)) return STATUS_INVALID_PARAMETER;
>              req_aff = *(const ULONG_PTR *)data;
>              if ((ULONG)req_aff == ~0u) req_aff = affinity_mask;
> +            else if ((LONG) req_aff < 0) req_aff = affinity_mask & req_aff;

It should be possible to add a test case for this. Also there should be
nothing special about negative values unless there's a test case that
shows that all negative values get accepted.

-- 
Dmitry.



More information about the wine-devel mailing list