Skip to content

Commit 0994449

Browse files
authored
[asan] suppress the static variable leaks (#1085) (#1159)
* [asan] suppress the static variable leaks This is to suppress ASAN false positives for static variables. For example, the ServiceMethodTable::m_slots is sometimes reported as leaked. Signed-off-by: Yakiv Huryk <[email protected]>
1 parent 6fc86a9 commit 0994449

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

syncd/Asan.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
#include <csignal>
44
#include <sanitizer/lsan_interface.h>
55

6+
extern "C" {
7+
const char* __lsan_default_suppressions() {
8+
// SWSS_LOG_ENTER(); // disabled
9+
return "leak:__static_initialization_and_destruction_0\n";
10+
}
11+
}
12+
613
static void sigterm_handler(int signo)
714
{
815
SWSS_LOG_ENTER();

0 commit comments

Comments
 (0)