From f6ff32cd79f5de0da18b7c44b3908a520d9e93b2 Mon Sep 17 00:00:00 2001
From: Harvey Tuch <htuch@google.com>
Date: Fri, 7 Jul 2017 09:56:32 -0400
Subject: [PATCH] Use consistent hash across NDEBUG/!NDEBUG builds.

Fixes #3322.
---
 src/google/protobuf/map.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index 28eaf03170..6a88600c63 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -862,14 +862,7 @@ class Map {
     size_type BucketNumber(const Key& k) const {
       // We inherit from hasher, so one-arg operator() provides a hash function.
       size_type h = (*const_cast<InnerMap*>(this))(k);
-      // To help prevent people from making assumptions about the hash function,
-      // we use the seed differently depending on NDEBUG.  The default hash
-      // function, the seeding, etc., are all likely to change in the future.
-#ifndef NDEBUG
-      return (h * (seed_ | 1)) & (num_buckets_ - 1);
-#else
       return (h + seed_) & (num_buckets_ - 1);
-#endif
     }
 
     bool IsMatch(const Key& k0, const Key& k1) const {