Skip to content

Commit e327de0

Browse files
authored
Skip leak warning test when ASAN is enabled (#2019)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
1 parent c593e32 commit e327de0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/tbb/test_task.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,11 @@ TEST_CASE("Check correct arena destruction with enqueue") {
865865
}
866866
}
867867

868+
#if !__TBB_USE_ADDRESS_SANITIZER
869+
// The test enforces memory leak of observers, expecting that by the time when scheduler releases
870+
// and the resources cleanup starts, the observers will be destroyed. Otherwise, the memory will be
871+
// cleared during process shutdown, but this is seen as a leak by ASAN; hence skipping the test.
872+
868873
//! \brief \ref regression
869874
TEST_CASE("Try to force Leaked proxy observers warning") {
870875
int num_threads = std::thread::hardware_concurrency() * 2;
@@ -885,6 +890,7 @@ TEST_CASE("Try to force Leaked proxy observers warning") {
885890
});
886891
});
887892
}
893+
#endif // !__TBB_USE_ADDRESS_SANITIZER
888894

889895
//! \brief \ref error_guessing
890896
TEST_CASE("Force thread limit on per-thread reference_vertex") {

0 commit comments

Comments
 (0)