Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.15
-
None
-
Windows
Description
Calling CloseHandle on an invalid handle. See here:
UNIV_INTERN os_thread_t recv_writer_thread_handle = 0;
recv_init_crash_recovery() does:
recv_writer_thread_handle = os_thread_create(recv_writer_thread, 0, 0);
recv_recovery_from_checkpoint_finish() does:
if (recv_writer_thread_handle)
{ CloseHandle(recv_writer_thread_handle); }However, os_thread_create() is not returning the HANDLE object from CreateThread, it is returning the lpThreadId!!!
Worst case scenario, crash recovery closes some actual valid file or thread handle and failure would be mysterious!
Best case, the handle doesn't exist and issue goes unnoticed.