Skip to content

Commit e24d519

Browse files
committed
[asan] suppress the static variable leaks (sonic-net#1085)
* [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]> * [asan] add missing SWSS_LOG_ENTER() Signed-off-by: Yakiv Huryk <[email protected]>
1 parent 57fcb47 commit e24d519

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)