diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 130da13ce7b..ec13a2f7c79 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -1327,6 +1327,7 @@ class raw_hash_set { } if (ABSL_PREDICT_TRUE(g.MatchEmpty())) return end(); seq.next(); + assert(seq.index() < capacity_ && "full table!"); } } template @@ -1678,8 +1679,8 @@ class raw_hash_set { #endif return {seq.offset(mask.LowestBitSet()), seq.index()}; } - assert(seq.index() < capacity_ && "full table!"); seq.next(); + assert(seq.index() < capacity_ && "full table!"); } } @@ -1710,6 +1711,7 @@ class raw_hash_set { } if (ABSL_PREDICT_TRUE(g.MatchEmpty())) break; seq.next(); + assert(seq.index() < capacity_ && "full table!"); } return {prepare_insert(hash), true}; } diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc index b980d1b26bf..46cdb67b1fb 100644 --- a/absl/debugging/internal/demangle.cc +++ b/absl/debugging/internal/demangle.cc @@ -1936,7 +1936,8 @@ static bool Overflowed(const State *state) { bool Demangle(const char *mangled, char *out, int out_size) { State state; InitState(&state, mangled, out, out_size); - return ParseTopLevelMangledName(&state) && !Overflowed(&state); + return ParseTopLevelMangledName(&state) && !Overflowed(&state) && + state.parse_state.out_cur_idx > 0; } } // namespace debugging_internal diff --git a/absl/status/status.h b/absl/status/status.h index de10996fa5b..42f634e0d85 100644 --- a/absl/status/status.h +++ b/absl/status/status.h @@ -365,8 +365,8 @@ class ABSL_MUST_USE_RESULT Status final { // Constructors // This default constructor creates an OK status with no message or payload. - // Avoid this constructor and pefer explicit construction of an OK status with - // `absl::OkStatus()`. + // Avoid this constructor and prefer explicit construction of an OK status + // with `absl::OkStatus()`. Status(); // Creates a status in the canonical error space with the specified