Skip to content

Commit

Permalink
Merge pull request #252 from eseiler/infra/gcc_asan
Browse files Browse the repository at this point in the history
[TEST] Disable gcc asan for expected overflow
  • Loading branch information
eseiler authored Dec 10, 2024
2 parents 8cf1c05 + 21d0b7a commit 4df28ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/unit/hibf/counting_vector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause

#ifndef HIBF_HAS_AVX512
# define HIBF_HAS_AVX512 0
#define HIBF_HAS_AVX512 0
#endif

#include <gtest/gtest.h> // for Message, TYPED_TEST, TestPartResult, ASSERT_EQ, EXPECT_EQ, Types
Expand Down Expand Up @@ -175,6 +175,7 @@ TYPED_TEST(counting_vector_test, size_not_divisible_by_64)
this->check_sub();
}

#if !(HIBF_COMPILER_IS_GCC && defined(__SANITIZE_ADDRESS__))
TYPED_TEST(counting_vector_test, overflow)
{
constexpr TypeParam max_value = std::numeric_limits<TypeParam>::max();
Expand All @@ -194,3 +195,4 @@ TYPED_TEST(counting_vector_test, overflow)
std::ranges::fill(this->expected, max_value);
this->check_sub(); // counting_vector[2033...2047] may underflow but it does not affect the actual results
}
#endif

0 comments on commit 4df28ad

Please sign in to comment.