You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Claude Warren (Jira)" <ji...@apache.org> on 2019/11/03 12:52:00 UTC

[jira] [Comment Edited] (CODEC-264) murmur3.hash64() does not account for unsigned in arguments

    [ https://issues.apache.org/jira/browse/CODEC-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16965662#comment-16965662 ] 

Claude Warren edited comment on CODEC-264 at 11/3/19 12:51 PM:
---------------------------------------------------------------

Made 0xff and 0x00000000FFFFFFFFL static final vars and replace their usage with the var in the Murmur3 code.
updated the changes.xml
renamed the tests.
Altered the pull request message

I have left the tab/space issue as that predates this change.  I don't think I made it worse.



was (Author: claudenw):
Made 0xff and 0x00000000FFFFFFFFL static final vars and replace their usage with the var in the Murmur3 code.
updated the changes.xml
renamed the tests.

I have left the tab/space issue as that predates this change.  I don't think I made it worse.


> murmur3.hash64() does not account for unsigned in arguments
> -----------------------------------------------------------
>
>                 Key: CODEC-264
>                 URL: https://issues.apache.org/jira/browse/CODEC-264
>             Project: Commons Codec
>          Issue Type: Bug
>    Affects Versions: 1.13
>            Reporter: Claude Warren
>            Priority: Major
>         Attachments: YonikMurmur3Tests.java
>
>
> The original murmur3_x64_128 code used unsigned int for seed arguments.  Using the equivalent bit patterns in the commons codec version does not yield the same results.
> I believe this is because the commons version does not account for sign extension etc.
> Yonic Seeley [~yonik] has explains the issue in his implementation https://github.com/yonik/java_util/blob/master/src/util/hash/MurmurHash3.java
> He provides a test case to show that his code returns the same answers as the original C/C++ code.  I modified that test to call the codec version to show the error.
> I have attached that test case.
> Given that the original code is in the wild I am uncertain how to fix this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)