You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Pugachev Maxim (JIRA)" <ji...@apache.org> on 2012/06/13 13:07:43 UTC

[jira] [Created] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Pugachev Maxim created AVRO-1115:
------------------------------------

             Summary: avro-c: possible crash error in codec cleanup code
                 Key: AVRO-1115
                 URL: https://issues.apache.org/jira/browse/AVRO-1115
             Project: Avro
          Issue Type: Bug
          Components: c
    Affects Versions: 1.7.0
            Reporter: Pugachev Maxim
            Priority: Critical


There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:

==15259== Conditional jump or move depends on uninitialised value(s)
==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Commented] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Pugachev Maxim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396563#comment-13396563 ] 

Pugachev Maxim commented on AVRO-1115:
--------------------------------------

Oh, yes, my fault. Should be "if(!type)" or "if(type == NULL)".
                
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Updated] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Pugachev Maxim (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pugachev Maxim updated AVRO-1115:
---------------------------------

    Attachment: AVRO-1115.patch

Patch for this issue.
                
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Updated] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Douglas Creager updated AVRO-1115:
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7.1
           Status: Resolved  (was: Patch Available)

Committed to SVN
                
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>             Fix For: 1.7.1
>
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Updated] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Pugachev Maxim (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pugachev Maxim updated AVRO-1115:
---------------------------------

    Status: Patch Available  (was: Open)
    
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Commented] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Pugachev Maxim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399155#comment-13399155 ] 

Pugachev Maxim commented on AVRO-1115:
--------------------------------------

Douglas, should I create a new patch? Or you correct it by yourself?
                
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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

        

[jira] [Commented] (AVRO-1115) avro-c: possible crash error in codec cleanup code

Posted by "Douglas Creager (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396274#comment-13396274 ] 

Douglas Creager commented on AVRO-1115:
---------------------------------------

I see {{(!type == 0)}} in the patch.  Should that be {{(type == NULL)}} instead?  I.e., fall back on the null codec if the caller provided a NULL codec name?
                
> avro-c: possible crash error in codec cleanup code
> --------------------------------------------------
>
>                 Key: AVRO-1115
>                 URL: https://issues.apache.org/jira/browse/AVRO-1115
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.0
>            Reporter: Pugachev Maxim
>            Priority: Critical
>         Attachments: AVRO-1115.patch
>
>
> There is a possible crash error in codec cleanup code. Test-case is simple: you need to call an "avro_file_writer_open" function with wrong file name (i.e. non-existent file). Valgrind output:
> ==15259== Conditional jump or move depends on uninitialised value(s)
> ==15259==    at 0x40340A9: avro_codec_reset (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x4035FBC: avro_file_writer_open (in /home/mpugachev/work/avro-trunk/lang/c/src/libavro.so.22.0.0)
> ==15259==    by 0x80485B0: main (in /home/mpugachev/work/test/avro/example4)

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