Jared Grubb created AVRO-1937:
---------------------------------
Summary: 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
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.4#6332)