search for: murmurhash3_128

Displaying 6 results from an estimated 6 matches for "murmurhash3_128".

2018 Mar 26
2
murmurhash3 test failures on big-endian systems
...d: memcmp(result, vectors[i].result, sizeof(result)) == 0 > > test-murmurhash3.c:22: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > > test-murmurhash3.c:22: Assert(#13) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > > murmurhash3 (murmurhash3_128) ........................................ : FAILED > > > > Looks like the murmurhash3 implementation in Dovecot is currently broken on > > big-endian systems. > > > > Regards, > > Apollon > > > > [1] https://buildd.debian.org/status/package.php?p=dove...
2018 Mar 26
0
murmurhash3 test failures on big-endian systems
...urmurhash3.c index 45dcc22..d0336a1 100644 --- a/src/lib/murmurhash3.c +++ b/src/lib/murmurhash3.c @@ -94,6 +94,8 @@ void murmurhash3_32 (const void *key, size_t len, uint32_t seed, h1 = fmix32(h1); + h1 = cpu32_to_be(h1); + memcpy(out, &h1, sizeof(h1)); } @@ -206,6 +208,9 @@ void murmurhash3_128(const void *key, size_t len, uint32_t seed, h1 += h2; h2 += h1; + h1 = cpu64_to_be(h1); + h2 = cpu64_to_be(h2); + memcpy(out, &h1, sizeof(h1)); memcpy(out+sizeof(h1), &h2, sizeof(h2)); } @@ -323,6 +328,11 @@ void murmurhash3_128(const void *key, size_t len, uint32_t seed,...
2018 Mar 26
2
murmurhash3 test failures on big-endian systems
...rhash3.c:22: Assert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 test-murmurhash3.c:22: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 test-murmurhash3.c:22: Assert(#13) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 murmurhash3 (murmurhash3_128) ........................................ : FAILED Looks like the murmurhash3 implementation in Dovecot is currently broken on big-endian systems. Regards, Apollon [1] https://buildd.debian.org/status/package.php?p=dovecot&suite=experimental
2018 Mar 27
2
murmurhash3 test failures on big-endian systems
...ult)) == 0 test-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 murmurhash3 (murmurhash3_32) ......................................... : FAILED test-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 murmurhash3 (murmurhash3_128) ........................................ : FAILED Regards, Apollon
2018 Mar 26
0
murmurhash3 test failures on big-endian systems
...sert(#11) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > test-murmurhash3.c:22: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > test-murmurhash3.c:22: Assert(#13) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > murmurhash3 (murmurhash3_128) ........................................ : FAILED > > Looks like the murmurhash3 implementation in Dovecot is currently broken on > big-endian systems. > > Regards, > Apollon > > [1] https://buildd.debian.org/status/package.php?p=dovecot&suite=experimental Hi! Thanks f...
2018 Mar 27
0
murmurhash3 test failures on big-endian systems
...-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > murmurhash3 (murmurhash3_32) ......................................... : FAILED > test-murmurhash3.c:34: Assert(#12) failed: memcmp(result, vectors[i].result, sizeof(result)) == 0 > murmurhash3 (murmurhash3_128) ........................................ : FAILED It turns out there's a missing byte-inversion when loading the blocks which should be addressed in getblock{32,64}. Murmurhash treats each block as an integer expecting little-endian storage. Applying this additional change fixes the build...