Skip to content

Commit e800a25

Browse files
committed
[FIX] gcc14: asan stack-use-after-scope
1 parent b18e8e2 commit e800a25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/performance/search/index_construction_benchmark.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ static constexpr size_t seed{0x6126f};
2626
static void arguments(benchmark::internal::Benchmark * b)
2727
{
2828
#ifndef NDEBUG
29-
for (int32_t length : {50, 5000})
29+
constexpr std::array<int32_t, 2> values{50, 5000};
3030
#else
31-
for (int32_t length : {50, 5000, 50'000})
31+
constexpr std::array<int32_t, 3> values{50, 5000, 50'000};
3232
#endif // NDEBUG
33+
for (int32_t length : values)
3334
{
3435
if (length > max_length)
3536
throw std::logic_error{"Increase max_length to at least " + std::to_string(length)};

0 commit comments

Comments
 (0)