Skip to content

Commit 5c0633f

Browse files
committed
Replace assert with if to prevent warning about unused variable.
GitOrigin-RevId: f9e72c623ace83f14b2268647a0880bcb49040a4
1 parent 86cb681 commit 5c0633f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎memprof/memprof.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ std::int32_t get_ht_pos(const Backtrace &bt, bool force = false) {
175175
pos++;
176176
if (pos == static_cast<std::int32_t>(ht.size())) {
177177
pos = 0;
178-
assert(!was_overflow);
178+
if (was_overflow) {
179+
// unreachable
180+
std::abort();
181+
}
179182
was_overflow = true;
180183
}
181184
}

0 commit comments

Comments
 (0)