Fix hashing on big endian platforms (#1028)
authorMilad Fa <46688537+miladfarca@users.noreply.github.com>
Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)
committerBenjamin Barenblat <bbaren@debian.org>
Fri, 27 May 2022 20:58:38 +0000 (21:58 +0100)
commit5883f402a727a4ba977bf03f9fc4c1478ed78a7b
treef2f390e2f57864e34f99786edb2a69e0ccb55cd3
parent4f7c8a6e0336f4c629ad284586be454adcc12937
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