Skip to content

Commit

Permalink
Disable AvifAllocTest.Extremes with msan
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud committed Jan 17, 2025
1 parent 7790468 commit 6395939
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/gtest/avifallocationtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,26 @@ TEST(EncodingTest, MaximumInvalidDimensions) {
AVIF_RESULT_UNSUPPORTED_DEPTH);
}

#if defined(__clang__) && defined(__has_feature)
// has to be on a different line for Windows.
#if __has_feature(memory_sanitizer)
#define TEST_EXTREMES 0
#else
#define TEST_EXTREMES 1
#endif
#else
#define TEST_EXTREMES 1
#endif

#if TEST_EXTREMES
TEST(AvifAllocTest, Extremes) {
void* p1 = avifAlloc(1);
EXPECT_NE(p1, nullptr);
avifFree(p1);

EXPECT_EQ(avifAlloc(std::numeric_limits<size_t>::max()), nullptr);
}
#endif

} // namespace
} // namespace avif

0 comments on commit 6395939

Please sign in to comment.