Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash test fails on 64-bit big endian CPU architecture #111

Closed
rogers0 opened this issue Jun 5, 2016 · 3 comments
Closed

Hash test fails on 64-bit big endian CPU architecture #111

rogers0 opened this issue Jun 5, 2016 · 3 comments

Comments

@rogers0
Copy link
Contributor

rogers0 commented Jun 5, 2016

Hash test fails on 64-bit big endian CPU architecture, such as s390x, ppc64 and sparc64:
/«BUILDDIR»/libcork-0.15.0+ds/tests/test-core.c:341:F:hash:test_hash:0: Unexpected hash value 0xac7d28cc (expected 0x74bde19d)

Build log can be referenced:
https://buildd.debian.org/status/fetch.php?pkg=libcork&arch=s390x&ver=0.15.0%2Bds-1&stamp=1464961690
https://buildd.debian.org/status/fetch.php?pkg=libcork&arch=ppc64&ver=0.15.0%2Bds-1&stamp=1464961396
https://buildd.debian.org/status/fetch.php?pkg=libcork&arch=sparc64&ver=0.15.0%2Bds-1&stamp=1465008367

@rogers0
Copy link
Contributor Author

rogers0 commented Jul 6, 2016

I tried on debian s390x porterbox. error msg is:
libcork/tests/test-core.c:332:F:hash:test_hash:0: Unexpected hash value 0xac7d28cc (expected 0x74bde19d)

and related code is:
test_hash_buf(BUF, LEN-1,
/* little 32 / 0xba6bd213,
/
big 32 / 0x29d175e5,
/
little 64 / 0xac7d28cc,
/
big 64 */ 0x74bde19d);

so maybe for 64bit Arch, the result is the same as little endian?

@rogers0
Copy link
Contributor Author

rogers0 commented Jul 7, 2016

Added my result of hash test from s390x on #131

@dcreager
Copy link
Owner

Closed by #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants