Fix hashing on big endian platforms (#1028)
authorMilad Fa <46688537+miladfarca@users.noreply.github.com>
Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)
committerBenjamin Barenblat <bbaren@debian.org>
Mon, 7 Feb 2022 16:54:21 +0000 (16:54 +0000)
commit13991b88b1c6777ca65c8443d2c17c65689b6a51
treec9e184b5e703cce071b49a73085f76e547052f36
parentfcff27dc8cd4d17317f7db93749f0f67548745e6
Fix hashing on big endian platforms (#1028)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1028
Origin: backport, https://github.com/abseil/abseil-cpp/commit/ae0f4c266095c9003786cd571bc1fb72544104a1
Bug-Debian: https://bugs.debian.org/977638

Avoid using libstdc++'s implementation of std::hash<std::bitset> and
std::hash<std::vector> on big endian platforms in the implementation
of absl::Hash.

This is a workaround for a buggy implementation that results in many
collisions.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731

Gbp-Pq: Name big-endian-hash2.diff
absl/hash/internal/hash.h
absl/hash/internal/wyhash_test.cc