thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Craig (JIRA)" <>
Subject [jira] [Commented] (THRIFT-1690) Sockets and Pipe Handles truncated on Win64
Date Wed, 14 Nov 2012 16:56:12 GMT


Ben Craig commented on THRIFT-1690:

I think we are agreeing (at least on some parts).  I don't want client code to require #ifdefs.
 I think we might be disagreeing (or at least not understanding each other) on how to go about

My proposal (that I don't have immediate plans on implementing) is to have a TAnonymousPipe
/ TAnonymousSocket transport.  I think that would provide the appropriate level of abstraction
in client code.

I would like TPipe to be focused on named pipes / AF_UNIX sockets.

If you have a specific suggestion for a way to merge the two in a way that is not client hostile,
I would be glad to review it.  I am open to being proven wrong.  Of course, in the end, I'm
not the one you need to convince, as I'm not a maintainer :)
> Sockets and Pipe Handles truncated on Win64
> -------------------------------------------
>                 Key: THRIFT-1690
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.9
>         Environment: 64-bit Windows
>            Reporter: Ben Craig
>            Assignee: Roger Meier
>         Attachments: lib_socket_typedef.patch, libthrift_pipe_size.patch, libthrift_warning_purge.patch
>   Original Estimate: 48h
>  Remaining Estimate: 48h
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message