Giter Site home page Giter Site logo

Comments (10)

wRAR avatar wRAR commented on September 7, 2024 1

Seems to work on s390x.

from librsync.

sourcefrog avatar sourcefrog commented on September 7, 2024

Can you have a look whether WORDS_BIGENDIAN and NATIVE_LITTLE_ENDIAN are getting set correctly?

from librsync.

wRAR avatar wRAR commented on September 7, 2024

WORDS_BIGENDIAN is set, NATIVE_LITTLE_ENDIAN is unset (checked by a program including config.h and blake2-impl.h).

from librsync.

sourcefrog avatar sourcefrog commented on September 7, 2024

I think the next step is to add a test that BLAKE2 produces the right hashes for specified input.

from librsync.

sourcefrog avatar sourcefrog commented on September 7, 2024

This might have been fixed by the change to CMake - please re-test if you have a bigendian machine.

from librsync.

wRAR avatar wRAR commented on September 7, 2024

Still fails in 01215e2

from librsync.

dbaarda avatar dbaarda commented on September 7, 2024

This is either a bug in the CMake config for blake2, or its a bug in blake2 itself.

The blake2 we use is a copy of upstream taken some time ago, so if this is a blake2 bug, it may be fixed upstream already. I also note that Debian sid now has a libb2 package, so this is starting to be available as a library on some platforms, though I don't think it's widely enough available that we don't need to provide it ourselves. IMHO we should;

  1. Check the endian related config settings needed by blake2 vs what we have in our config.h and CMakeLists.txt to make sure we are setting things right.

  2. Get a newer copy from upstream to see if it's an upstream bug that's been fixed.

  3. Change our cmake config to use the platform provided library if it exists.

from librsync.

dbaarda avatar dbaarda commented on September 7, 2024

I had a look and there is nothing endian related in our CMakeLists.txt. Our config.h.cmake includes a bunch of #ifdef tests that look to me like it would default to little-endian unless on apple with AC_APPLE_UNIVERSAL_BUILD and BIG_ENDIAN defined, which is not exactly robust. IMHO we should use cmake's TestBigEndian.

However, your tests seem to indicate that the existing limited endian check is correctly detecting your platform as big-endian. This suggests it must be a blake2 bug in the version we have a copy of.

from librsync.

dbaarda avatar dbaarda commented on September 7, 2024

I just created pull request #113 to update to the latest blake2 reference implementation. Can someone check/confirm if this fixes this problem?

from librsync.

dbaarda avatar dbaarda commented on September 7, 2024

For the record, pull request #114 adds support for using libb2 if it is found.

from librsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.