You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Douglas Creager (Updated) (JIRA)" <ji...@apache.org> on 2012/02/15 03:11:59 UTC

[jira] [Updated] (AVRO-1031) C test case makes too many assumptions of memcmp

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

Douglas Creager updated AVRO-1031:
----------------------------------

    Attachment: 0001-AVRO-1031.-C-avro_value_cmp-doesn-t-necessarily-retu.patch

Here's a patch.  The issue was that avro_value_cmp doesn't necessarily return just -1, 0, or 1.  It can return any negative value for “less than”, and any positive value for “greater than”.  (This matches what strcmp and memcmp can return.)
                
> C test case makes too many assumptions of memcmp
> ------------------------------------------------
>
>                 Key: AVRO-1031
>                 URL: https://issues.apache.org/jira/browse/AVRO-1031
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.6.2
>            Reporter: Douglas Creager
>            Assignee: Douglas Creager
>            Priority: Minor
>             Fix For: 1.6.3
>
>         Attachments: 0001-AVRO-1031.-C-avro_value_cmp-doesn-t-necessarily-retu.patch
>
>
> Philip reported this during the voting for the 1.6.2 release:
> {noformat}
> [0]air::tests(276231)$./test_avro_values
> **** Running boolean tests ****
> | 00 .. .. .. .. .. .. .. | .. .. .. .. .. .. .. .. | ................
> | 01 .. .. .. .. .. .. .. | .. .. .. .. .. .. .. .. | ................
> **** Running bytes tests ****
> | 08 DE AD BE EF .. .. .. | .. .. .. .. .. .. .. .. | .^->o...........
> Incorrect sort order
> {noformat}

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