Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1690

Sockets and Pipe Handles truncated on Win64

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9
    • None
    • C++ - Library
    • None
    • 64-bit Windows

    Description

      On 64-bit Windows, "int" is a 32-bit value. SOCKET and HANDLE are 64-bit.

      All of the files dealing with sockets in thrift use "int" as the type of a socket, as this is the idiomatic way to handle sockets on POSIX systems. For portability, a SOCKET typedef is probably needed.

      For the Pipe Server and Pipe Transport, HANDLEs are cast to ints to store as member variables for some reason (maybe to avoid #including <windows.h> in a header?).

      Both of these situations can result in invalid handles being used (and valid handles being leaked) when the system is under load.

      Attachments

        1. libthrift_warning_purge.patch
          40 kB
          Ben Craig
        2. libthrift_pipe_size.patch
          21 kB
          Ben Craig
        3. lib_socket_typedef.patch
          0.8 kB
          Ben Craig

        Activity

          People

            roger Roger Meier
            ben.craig Ben Craig
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified