[
https://issues.apache.org/jira/browse/AVRO-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15872924#comment-15872924
]
ASF subversion and git services commented on AVRO-1937:
-------------------------------------------------------
Commit ce36fffca8dd0bf8f5282041ba473e84193483c1 in avro's branch
refs/heads/master from Thiruvalluvan M G
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=ce36fff ]
Fixed AVRO-1937, C++ code genrator now handles recursive structures well
> 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)