Skip to content

Commit

Permalink
SuperFastHash: codify an UB-based Verification value :-)
Browse files Browse the repository at this point in the history
It's unclear to me if it should be `0` (SKIP) or just a value that
is quite common across platforms and compilers.
  • Loading branch information
darkk committed Sep 25, 2024
1 parent f926053 commit c938607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ HashInfo g_hashes[] =
{ jodyhash64_test, 64, 0xC1CBFA34, "jodyhash64", "jodyhash, 64-bit (v7.1)", POOR, {} },
#endif
{ lookup3_test, 32, 0x3D83917A, "lookup3", "Bob Jenkins' lookup3", POOR, {0x21524101} /* !! */},
#ifdef __aarch64__
#if defined(CHAR_MIN) && CHAR_MIN == 0 // Well-defined "char is unsigned" case.
#define SFAST_VERIF 0x6306A6FE
#else
#elif CHAR_MIN < 0 // UB in SuperFastHash: (negative-signed << N)
#define SFAST_VERIF 0x0C80403A
#endif
{ SuperFastHash_test, 32, SFAST_VERIF,"superfast", "Paul Hsieh's SuperFastHash", POOR, {0x0} /* !! */},
{ SuperFastHash_test, 32, SFAST_VERIF,"superfast", "Paul Hsieh's SuperFastHash, CHAR_MIN:" MACRO_ITOA(CHAR_MIN), POOR, {0x0} /* !! */},
{ MurmurOAAT_test, 32, 0x5363BD98, "MurmurOAAT", "Murmur one-at-a-time", POOR,
{0x0 /*, 0x5bd1e995*/} /* !! */ },
{ Crap8_test, 32, 0x743E97A1, "Crap8", "Crap8", POOR, {/*0x83d2e73b, 0x97e1cc59*/} },
Expand Down

0 comments on commit c938607

Please sign in to comment.