avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Creager (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-968) Avro C - avro_value_cmp_fast() may return garbage value for AVRO_STRING comparison
Date Tue, 24 Jan 2012 14:08:43 GMT

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

Douglas Creager updated AVRO-968:
---------------------------------

    Resolution: Fixed
      Assignee: Douglas Creager
        Status: Resolved  (was: Patch Available)

Yeah, I committed the patch a few weeks ago.  Wasn't sure if we needed to discuss the refactoring
that you suggested.  We can open up another issue for that if we choose to do that.  Closing!
                
> Avro C - avro_value_cmp_fast() may return garbage value for AVRO_STRING comparison
> ----------------------------------------------------------------------------------
>
>                 Key: AVRO-968
>                 URL: https://issues.apache.org/jira/browse/AVRO-968
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.6.1, 1.6.2, 1.7.0
>         Environment: All. Currently using gcc 4.6.1 on Ubuntu 11.10.
>            Reporter: Vivek Nadkarni
>            Assignee: Douglas Creager
>            Priority: Minor
>             Fix For: 1.6.2, 1.7.0
>
>         Attachments: 0001-AVRO-968.-C-Fixed-avro_value_cmp-on-string-values.patch, AVRO-968.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Compiler shows a warning that variables may be used uninitialized in avro_value_cmp_fast():
> /home/user/avro-trunk/lang/c/src/value.c: In function 'avro_value_cmp_fast':
> /home/user/avro-trunk/lang/c/src/value.c:387:13: warning: 'size2' may be used uninitialized
in this function [-Wuninitialized]
> /home/user/avro-trunk/lang/c/src/value.c:387:13: warning: 'size1' may be used uninitialized
in this function [-Wuninitialized]
> /home/user/avro-trunk/lang/c/src/value.c:388:11: warning: 'buf1' may be used uninitialized
in this function [-Wuninitialized]
> /home/user/avro-trunk/lang/c/src/value.c:388:11: warning: 'buf2' may be used uninitialized
in this function [-Wuninitialized]
> Examining the file shows that the warnings are real, and the variables size1, buf1, size2,
buf2 should be loaded before they are used. The simple fix is to copy matching code from the
function avro_value_equal_fast(). I will attach that code in an upcoming patch. 
> Cheers,
> 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