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

Hudson commented on THRIFT-1831:
--------------------------------

Integrated in Thrift #615 (See [https://builds.apache.org/job/Thrift/615/])
    THRIFT-1831 Bug in list deserializer (Revision 
d5364246335f33c75d1c18fad5c5fbd974b8f929)

     Result = FAILURE
roger : 
https://git-wip-us.apache.org/repos/asf?p=thrift.git&a=commit&h=d5364246335f33c75d1c18fad5c5fbd974b8f929
Files : 
* compiler/cpp/src/generate/t_c_glib_generator.cc

                
> Bug in list deserializer
> ------------------------
>
>                 Key: THRIFT-1831
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1831
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Compiler
>    Affects Versions: 0.9
>         Environment: Linux x86, glib 2.34 (latest)
>            Reporter: Satheesh Velmurugan
>              Labels: c_glib, list
>         Attachments: thrift-0.9.0-fix-THRIFT-1831.patch
>
>
> The function generate_deserialize_list_element() has a functional bug. It 
> uses the following code to append a new element while deserializing.
> out << "g_array_append_val (" << prefix << ", " << elem << ");" << endl
> g_array_append_val() is a macro is glib which expects an array element, 
> whereas "elem" in generate_deserialize_list_element() is a pointer to the 
> array element. Deserialization doesn't work because of it. I don't think this 
> part of the code was ever tested. I don't see any test or example code in 
> c_glib which use lists.
> One way to fix this is to use the glib API g_array_append_vals() instead. 
> (BTW, g_array_append_val() is a wrapper macro which uses 
> g_array_append_vals() internally). I'll attach the patch. It's been tested 
> already.

--
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

Reply via email to