You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jon Dugan (JIRA)" <ji...@apache.org> on 2009/02/12 04:29:59 UTC

[jira] Created: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
--------------------------------------------------------------------------------------------------

                 Key: THRIFT-340
                 URL: https://issues.apache.org/jira/browse/THRIFT-340
             Project: Thrift
          Issue Type: Bug
          Components: Library (Python)
         Environment: FreeBSD 7
            Reporter: Jon Dugan


TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  

This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.

This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Comment: was deleted

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Attachment: bug340.tar.gz

Here's some code to reproduce it on FreeBSD and OS X.

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

Posted by "Jon Dugan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672928#action_12672928 ] 

jdugan edited comment on THRIFT-340 at 2/12/09 1:47 AM:
-----------------------------------------------------------

Here's a patch to fix lib/py/src/protocol/fastbinary.c.  __BYTE_ORDER isn't defined on FreeBSD and OS X, but BYTE_ORDER is.  I found this in  lib/cpp/src/protocol/TProtocol.h and transplanted it into fastbinary.c.  See comment in original... ;)




      was (Author: jdugan):
    Here's a patch to fix lib/py/src/protocol/fastbinary.c.  __BYTE_ORDER isn't defined on FreeBSD and Linux, but BYTE_ORDER is.  I found this in  lib/cpp/src/protocol/TProtocol.h and transplanted it into fastbinary.c.  See comment in original... ;)



  
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Attachment: thrift_py_fastbinary_endian.patch

Here's a patch to fix lib/py/src/protocol/fastbinary.c.  __BYTE_ORDER isn't defined on FreeBSD and Linux, but BYTE_ORDER is.  I found this in  lib/cpp/src/protocol/TProtocol.h and transplanted it into fastbinary.c.  See comment in original... ;)




> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Bryan Duxbury reassigned THRIFT-340:
------------------------------------

    Assignee: Jon Dugan

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD, OS X
>            Reporter: Jon Dugan
>            Assignee: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Attachment: thrift_py_fastbinary_endian.patch

This fixes the problem for OS X and FreeBSD.  See the comment in the current version of fastbinary.c regarding the origin of the ntohll/htonll #defines.

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Attachment:     (was: thrift_py_fastbinary_endian.patch)

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

David Reiss resolved THRIFT-340.
--------------------------------

    Resolution: Fixed

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD, OS X
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

Posted by "Ben Maurer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673686#action_12673686 ] 

Ben Maurer commented on THRIFT-340:
-----------------------------------

Please make sure the unit tests catch this, other than that, LGTM.

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD, OS X
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

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

Jon Dugan updated THRIFT-340:
-----------------------------

    Environment: FreeBSD, OS X  (was: FreeBSD 7)
     Patch Info: [Patch Available]

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD, OS X
>            Reporter: Jon Dugan
>         Attachments: bug340.tar.gz, thrift_py_fastbinary_endian.patch
>
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-340) TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672867#action_12672867 ] 

David Reiss commented on THRIFT-340:
------------------------------------

I can't reproduce this.  If you can provide an example, that would be great.

> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-340
>                 URL: https://issues.apache.org/jira/browse/THRIFT-340
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Python)
>         Environment: FreeBSD 7
>            Reporter: Jon Dugan
>
> TBinaryProtocol and TBinaryProtocolAccelerated produce different values for at least the i64 type.
> I don't have a nicely broken out example, but this is very easy to reproduce.  I can generate an example if needed.  
> This was true in the snapshot of the SVN repo from Jan 9, 2009.  I checked recent commits and didn't see anything to address it.
> This appears to be very similar to THRIFT-313.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.