avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiruvalluvan M. G. (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1937) C++ generator for recursive structure crashes
Date Tue, 14 Feb 2017 11:51:42 GMT

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

Thiruvalluvan M. G. updated AVRO-1937:
--------------------------------------
    Attachment: AVRO-1937.patch

> C++ generator for recursive structure crashes
> ---------------------------------------------
>
>                 Key: AVRO-1937
>                 URL: https://issues.apache.org/jira/browse/AVRO-1937
>             Project: Avro
>          Issue Type: Bug
>          Components: c++
>    Affects Versions: 1.8.1
>            Reporter: Jared Grubb
>         Attachments: AVRO-1937.patch
>
>
> I was testing out a Avro specification for a tree type and the generator crashed. I saw
that there was a prior bug (AVRO-1667) that fixed some things in the Java parser. 
> The same test-case on that bug will cause avrogencpp to segfault.
> $ cat tree.avro
> {
>     "type":"record",
>     "name":"SampleNode",
>     "namespace":"org.spf4j.ssdump2.avro",
>     "fields":[
>          {"name":"count","type":"int","default":0},
>          {"name":"subNodes","type":
>             {"type":"array","items":{
>                 "type":"record","name":"SamplePair",
>                 "fields":[
>                    {"name":"method","type":
>                        {"type":"record","name":"Method",
>                        "fields":[
>                           {"name":"declaringClass","type":{"type":"string","avro.java.string":"String"}},
>                           {"name":"methodName","type":{"type":"string","avro.java.string":"String"}}
>                        ]}},
>                    {"name":"node","type":"SampleNode"}
>                 ]
>             }}
>         }
>     ]
> } 
> $ avrogencpp -i tree.avro -o avro.cpp
> [ segfault ]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message