Skip to content

Do not close file after mmap (Windows version) #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

dfyz
Copy link
Collaborator

@dfyz dfyz commented Apr 18, 2023

This is the Windows version of #1017. Just as with Unix-based systems, closing the same handle twice is mostly harmless, but when working on #1010, I noticed that the duplicated CloseHandle() triggers an "Invalid handle" exception in the debugger:

(3f00.2cbc): Invalid handle - code c0000008 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
ntdll!KiRaiseUserExceptionDispatcher+0x3a:
00007ffb`5e072d6a 8b8424c0000000  mov     eax,dword ptr [rsp+0C0h] ss:0000008e`6cffd230=c0000008

You can skip this exception and continue debugging, but I think it's better to fix this properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants