[Bug 44818] New: ntdll.NtClose (kernel32.CloseHandle) should throw invalid handle exception (EXCEPTION_INVALID_HANDLE) for invalid handles when run under debugger

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Mar 25 11:42:35 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=44818

            Bug ID: 44818
           Summary: ntdll.NtClose (kernel32.CloseHandle) should throw
                    invalid handle exception (EXCEPTION_INVALID_HANDLE)
                    for invalid handles when run under debugger
           Product: Wine
           Version: 3.4
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ntdll
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

to track
https://github.com/wine-staging/wine-staging/blob/master/patches/ntdll-Exception/0001-ntdll-Throw-exception-if-invalid-handle-is-passed-to.patch

Unfortunately there is no further information/details.
My guess would be that Sebastian observed this behaviour while debugging some
application under native Windows.

MSDN: 

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx

--- quote ---
If the application is running under a debugger, the function will throw an
exception if it receives either a handle value that is not valid or a
pseudo-handle value. This can happen if you close a handle twice, or if you
call CloseHandle on a handle returned by the FindFirstFile function instead of
calling the FindClose function.
--- quote ---

Some forum thread:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/fd5deb8e-4003-4de6-9429-49e196e4fb3f/invalid-handle-exception-on-wmclose?forum=windowsgeneraldevelopmentissues

$ wine --version
wine-3.4

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list