avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vivek Nadkarni (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-984) Avro C - Resolved reader fails to read nested arrays and reads uninitialized memory
Date Tue, 20 Dec 2011 22:51:30 GMT

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

Vivek Nadkarni updated AVRO-984:
--------------------------------

    Attachment: avro-984-test-v2.c

I have updated the test program, so that it can be included in the Avro C tests. It contains
the following changes:  

1. Exit with exit code EXIT_FAILURE, if the program fails to run to completion. 

2. Unlink the temporary binary file created by the program, if the program runs to completion.
(If it fails, the binary file is not removed.)

3. Include the Apache License boilerplate at the top of the file. 

I have named the file avro-984-test-v2.c to differentiate it from avro-984-test.c. However,
feel free to rename the file appropriately before including it into the Avro tests. 

Thanks,
Vivek

                
> Avro C - Resolved reader fails to read nested arrays and reads uninitialized memory
> -----------------------------------------------------------------------------------
>
>                 Key: AVRO-984
>                 URL: https://issues.apache.org/jira/browse/AVRO-984
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.6.1, 1.6.2, 1.7.0
>         Environment: GNU/Linux Ubuntu 11.10 64-bit 
>            Reporter: Vivek Nadkarni
>             Fix For: 1.6.2, 1.7.0
>
>         Attachments: avro-984-output.txt, avro-984-test-v2.c, avro-984-test.c, avro-984-valgrind-output.txt,
resolved-writer.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Summary: 
> I created a test program that creates an avro value corresponding to
> the following schema: 
>   {"type":"array", "items": {"type": "array", "items": "long"}}
> and tries to read it back using a matched and resolved reader. The
> matched reader is able to reconstruct the avro value, but the resolved
> reader fails to read the value. 
> Additionally valgrind indicates that conditional jumps are being
> performed based on uninitialized memory, when trying to reconstruct
> the value using the resolved reader.
> More Details:
> I created a test program that creates an avro value corresponding to
> the following writer schema: 
>   {"type":"array", "items": {"type": "array", "items": "long"}}
> The avro value is serialized to memory. 
> Then this memory is read back into two readers. In both cases the
> reader schema is set to be identical to the writer schema.
> The first reader is a matched reader -- i.e. the reader knows that the
> writer and reader schema are identical. 
> The second reader is a resolved reader -- i.e. the reader tries to
> resolve differences between the writer and reader schema. The schemas
> should resolve perfectly, since the writer and reader schema are
> identical.
> When we try to deserialize the binary buffer with the matched reader,
> the value is reconstructed perfectly.
> When we try to deserialize the binary buffer with the resolved reader,
> the code fails to populate the avro value. This failure indicates that
> the resolved reading of the nested array not working
> properly. Additionally valgrind indicates that conditional jumps are
> being performed based on uninitialized values, in this second case.
> I will attach a test program that shows the issues. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message