Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.1
-
None
-
None
Description
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":"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"}}
]}},
]
}}
}
]
}
$ avrogencpp -i tree.avro -o avro.cpp
[ segfault ]