You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Simon South (JIRA)" <ji...@apache.org> on 2014/08/31 05:29:52 UTC

[jira] [Updated] (THRIFT-2683) c_glib: Seg fault when deserializing a map with typedef'd keys

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

Simon South updated THRIFT-2683:
--------------------------------

    Attachment: thrift-2683-c_glib-resolve-typedef-when-deserializing-map.patch

> c_glib: Seg fault when deserializing a map with typedef'd keys
> --------------------------------------------------------------
>
>                 Key: THRIFT-2683
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2683
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Compiler
>    Affects Versions: 0.9.1
>         Environment: Fedora 20 64-bit on x86_64
>            Reporter: Simon South
>            Priority: Minor
>              Labels: c_glib, compiler
>         Attachments: thrift-2683-c_glib-resolve-typedef-when-deserializing-map.patch
>
>
> In the c_glib implementation, attempting to deserialize a map that uses a typedef'd type for its keys will usually result in a segmentation fault.
> This is because the code in the compiler that generates a variable declaration for a pointer to key values fails to first resolve the typedef to its underlying type. In most cases it will therefore generate incorrect code, effectively allocating a variable on the stack but later using it as though it were a pointer.
> The attached patch fixes this. (No test case is provided, but the integration test implementation I'm about to submit relies on this patch.)



--
This message was sent by Atlassian JIRA
(v6.2#6252)