QueueUserAPC() should set GetLastError() to return ERROR_GEN_FAILURE in the unlikely but inevitable circumstance it's called on a thread set to STATUS_THREAD_IS_TERMINATING. It currenly returns ERROR_ACCESS_DENIED which is unexpected behavior.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50704 Signed-off-by: David Koolhoven david@koolhoven-home.net --- v2: Fix test breakage. --- dlls/ntdll/error.c | 2 +- dlls/ntdll/make_errors | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/error.c b/dlls/ntdll/error.c index fb630fa9864..3b6b2ecdebe 100644 --- a/dlls/ntdll/error.c +++ b/dlls/ntdll/error.c @@ -475,7 +475,7 @@ static const DWORD error_map[1579] = ERROR_INVALID_PARAMETER, /* c0000048 (STATUS_PORT_ALREADY_SET) */ ERROR_INVALID_PARAMETER, /* c0000049 (STATUS_SECTION_NOT_IMAGE) */ ERROR_SIGNAL_REFUSED, /* c000004a (STATUS_SUSPEND_COUNT_EXCEEDED) */ - ERROR_ACCESS_DENIED, /* c000004b (STATUS_THREAD_IS_TERMINATING) */ + ERROR_GEN_FAILURE, /* c000004b (STATUS_THREAD_IS_TERMINATING) */ ERROR_INVALID_PARAMETER, /* c000004c (STATUS_BAD_WORKING_SET_LIMIT) */ ERROR_INVALID_PARAMETER, /* c000004d (STATUS_INCOMPATIBLE_FILE_MAP) */ ERROR_INVALID_PARAMETER, /* c000004e (STATUS_SECTION_PROTECTION) */ diff --git a/dlls/ntdll/make_errors b/dlls/ntdll/make_errors index bedce57fe7a..b7a2a346e5c 100755 --- a/dlls/ntdll/make_errors +++ b/dlls/ntdll/make_errors @@ -307,7 +307,7 @@ my %error_map = qw( STATUS_PORT_ALREADY_SET ERROR_INVALID_PARAMETER STATUS_SECTION_NOT_IMAGE ERROR_INVALID_PARAMETER STATUS_SUSPEND_COUNT_EXCEEDED ERROR_SIGNAL_REFUSED - STATUS_THREAD_IS_TERMINATING ERROR_ACCESS_DENIED + STATUS_THREAD_IS_TERMINATING ERROR_GEN_FAILURE STATUS_BAD_WORKING_SET_LIMIT ERROR_INVALID_PARAMETER STATUS_INCOMPATIBLE_FILE_MAP ERROR_INVALID_PARAMETER STATUS_SECTION_PROTECTION ERROR_INVALID_PARAMETER