[ 
https://issues.apache.org/jira/browse/THRIFT-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roger Meier resolved THRIFT-3378.
---------------------------------
    Resolution: Fixed
      Assignee: Nobuaki Sukegawa

> 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