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-1034) Avro C Resolved reader does not initialize children of arrays, resulting in segmentation faults
Date Wed, 29 Feb 2012 07:17:57 GMT

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

Vivek Nadkarni updated AVRO-1034:
---------------------------------

    Attachment: avro-1034-test-2.c

I am attaching a new test case avro-1034-test-2.c. This test case
results in a segmentation fault when I apply Doug's patch
0001-AVRO-1034.-C-Resolved-reader-initializes-child-array.patch, but
does not result in a segmentation fault when I apply my patch
AVRO-1034.patch.

I don't know if the problem is with Doug's patch or if I am operating
incorrectly on the resolved value in my test case. Specifically, I am
calling avro_value_reset() on the resolved value.

In this test case I populate a source value (nested) with a nested
array and read it using a resolved reader value (resolved_record). I
then call avro_value_reset on both the source value and the resolved
reader value. I then re-populate the source value with a larger nested
array, and proceed to read it using the same resolved reader. 

On this second read attempt, the code seg-faults, when I am using
Doug's patch. However, if I do not call avro_value_reset() on the
resolved reader value, then the code does not seg-fault and appears to
operate correctly, again using Doug's patch. 

Is it permissible to call avro_value_reset() on the resolved reader
value?

Thanks,
Vivek

                
> Avro C Resolved reader does not initialize children of arrays, resulting in segmentation
faults
> -----------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1034
>                 URL: https://issues.apache.org/jira/browse/AVRO-1034
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.6.2
>         Environment: GNU/Linux Ubuntu 11.10 64-bit
>            Reporter: Vivek Nadkarni
>             Fix For: 1.6.3
>
>         Attachments: 0001-AVRO-1034.-C-Resolved-reader-initializes-child-array.patch,
AVRO-1034.patch, avro-1034-test-2.c, avro-1034-test.c
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As I did in AVRO-984, I created a test program that creates an avro 
> value corresponding to the following schema: 
>   {"type":"array", "items": {"type": "array", "items": "long"}}
> The avro_value is then resolved using a resolved_reader, and an 
> attempt is made to read from the resolved_reader. This results in a
> segmentation fault on Linux.
> I believe this issue is similar to the issue in AVRO-984, in which
> nested arrays did not work because avro_resolved_array_writer_init()
> did not recursively call the init function on its children. In that
> case the initialization had to be deferred until a new item was
> appended to the array.
> I believe that avro_resolved_array_reader_init() should also
> recursively call the init function on its children, in a deferred
> manner as in AVRO-984, but I don't know how to implement this yet.
> I will attach a test program that shows the crash. 
> Thanks,
> Vivek

--
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