From d03f54ef130a3070965618eae4e0e8f97cdd4ca6 Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Thu, 7 Mar 2024 08:18:47 -0800 Subject: Avoid MSan: use-of-uninitialized-value error in find_non_soo. PiperOrigin-RevId: 613590317 Change-Id: I69f095681102e5492916085ada0eed085a75765b --- absl/container/internal/raw_hash_set.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'absl/container/internal/raw_hash_set.h') diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index d4418339..81f99366 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -3295,14 +3295,13 @@ class raw_hash_set { iterator find_non_soo(const key_arg& key, size_t hash) { assert(!is_soo()); auto seq = probe(common(), hash); - slot_type* slot_ptr = slot_array(); const ctrl_t* ctrl = control(); while (true) { Group g{ctrl + seq.offset()}; for (uint32_t i : g.Match(H2(hash))) { if (ABSL_PREDICT_TRUE(PolicyTraits::apply( EqualElement{key, eq_ref()}, - PolicyTraits::element(slot_ptr + seq.offset(i))))) + PolicyTraits::element(slot_array() + seq.offset(i))))) return iterator_at(seq.offset(i)); } if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end(); -- cgit v1.2.3