[ https://issues.apache.org/jira/browse/THRIFT-1973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13672122#comment-13672122 ]
Hudson commented on THRIFT-1973: -------------------------------- Integrated in Thrift #655 (See [https://builds.apache.org/job/Thrift/655/]) THRIFT-1973 TCompactProtocol in C# lib does not serialize and deserialize negative int32 and int64 number correctly (Revision da7982edeaff5d47485909662ebd489d67a4085a) THRIFT-1973 TCompactProtocol in C# lib does not serialize and deserialize negative int32 and int64 number correctly (Revision 5a61438a5e61505d226d9aef1d131659109e5781) Result = SUCCESS henrique : Files : * lib/csharp/src/Transport/TMemoryBuffer.cs * lib/csharp/Makefile.am * lib/csharp/src/Thrift.sln * lib/csharp/test/ThriftTest/maketest.sh * lib/csharp/src/Protocol/TCompactProtocol.cs * test/ThriftTest.thrift * lib/csharp/test/ThriftTest/ThriftTest.csproj henrique : Files : * lib/csharp/Makefile.am * lib/csharp/test/ThriftTest/ThriftTest.csproj * test/ThriftTest.thrift * lib/csharp/src/Thrift.sln * lib/csharp/src/Transport/TMemoryBuffer.cs > TCompactProtocol in C# lib does not serialize and deserialize negative int32 > and int64 number correctly > ------------------------------------------------------------------------------------------------------- > > Key: THRIFT-1973 > URL: https://issues.apache.org/jira/browse/THRIFT-1973 > Project: Thrift > Issue Type: Bug > Components: C# - Library > Affects Versions: 0.9, 1.0 > Environment: Windows > Reporter: Eric Ding > Assignee: Henrique Mendonça > Labels: PatchAvailable > Fix For: 1.0 > > Attachments: 1973-test-suite.patch, 1973-test-suite-v2.patch, > thrift-1973-TCompactProtocol-Fix.patch > > > longToZigzag and ZigzagToLong in TCompactProtocol does not perform > corresponding operations to serialize and deserialize negative int32 and > int64 number correctly. Purpose to change longToZigzag from > (ulong)(((ulong)n << 1) ^ ((ulong)n >> 63)) to (ulong)(n << 1) ^ (ulong)(n >> > 63). > Will need to do same for intToZigZag. The reason is that we want arithmetic > shift not logic shift. > The test case in the project shows this, the output on server and client are > different even though client received the same number back. -- 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: http://www.atlassian.com/software/jira