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

ASF GitHub Bot commented on THRIFT-3378:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/644


> 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