Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7034299

Faulty Winsock initialization code in src/os/windows/vm/os_windows.cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • hs24
    • 7
    • hotspot
    • None
    • x86
    • windows_nt

        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?

              neliasso Nils Eliasson (Inactive)
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: