[ 
https://issues.apache.org/jira/browse/THRIFT-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952098#comment-14952098
 ] 

Hudson commented on THRIFT-3378:
--------------------------------

SUCCESS: Integrated in Thrift #1682 (See 
[https://builds.apache.org/job/Thrift/1682/])
THRIFT-3378 c_glib service does not handle negative Thrift byte values (roger: 
rev 30f465db92b95d6beedb8d5d056792a4e75f0158)
* compiler/cpp/src/generate/t_c_glib_generator.cc
* test/c_glib/src/test_client.c


> c_glib service does not handle negative Thrift byte values correctly
> --------------------------------------------------------------------
>
>                 Key: THRIFT-3378
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3378
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Compiler
>            Reporter: Nobuaki Sukegawa
>            Assignee: Nobuaki Sukegawa
>
> There's a problematic type cast in generated c_glib service code that treat 
> the sign bit of gint8 as normal bit (i.e. 128).
> The problem is illustrated as follows.
> {code}
> int i = 0;
> users_handler_func((*gint8)&i);  // Suppose this function tries to set i to 
> -100
> store_handler_result(i);         // This stores 156, not -100
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to