Dan discovered a faulty Winsock initialization code in src/os/windows/vm/os_windows.cpp:initSock().
Copied from Dan's email, the line number may not be accurate.
This block is supposed to only allow one thread to init the
WinSock2 stuff. Consider this scenario:
- thread-1 makes it through line 4638 so it owns the mutex
- thread-2 makes it past line 4635 so it calls mutexInit()
on the mutex that thread-1 owns; does this mess up the
mutex?
- thread-1 finishes initializing WinSock2 and gets to line 4647
where it calls mutexUnlock() on the mutex; does this work when
thread-2 has called mutexInit() on the mutex?