-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[asan] suppress the static variable leaks #1085
Conversation
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 <yhuryk@nvidia.com>
syncd/Asan.cpp
Outdated
extern "C" { | ||
const char* __lsan_default_suppressions() { | ||
return "leak:__static_initialization_and_destruction_0\n"; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this sounds really bad, you are implementing missing import here, why this way ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is rather a callback than a missing import. This is one of the ways to configure ASAN/LSAN.
Another way is to have a file (e.g. supressions.txt) and pass a path to it via env variable options.
The 'callback' approach is simpler and allows to keep all the asan-related things in asan.cpp.
This also seems to be a more popular way to configure the suppressions (e.g. chromium does this).
please fix build errors |
Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@kcudnik could you please help to merge? |
Update sonic-sairedis submodule pointer to include the following: * Run 20 vs tests at a time. ([sonic-net#1111](sonic-net/sonic-sairedis#1111)) * [asan] suppress the static variable leaks ([sonic-net#1085](sonic-net/sonic-sairedis#1085)) * [sonic-sairedis] Support bulk counter ([sonic-net#1094](sonic-net/sonic-sairedis#1094)) * Transfer organization from Azure to sonic-net ([sonic-net#1095](sonic-net/sonic-sairedis#1095)) * [BFN] Provide unified approach to select P4 profile based on chip family ([sonic-net#1089](sonic-net/sonic-sairedis#1089)) Signed-off-by: dprital <drorp@nvidia.com>
* 660a920 [Chassis] Create fabric ports for switch_type fabric. (sonic-net/sonic-sairedis#1114) * 8140c22 Fix issue: bulk counter feature cannot compile on platforms having no sai_bulk_object_get_stats/sai_bulk_object_clear_stats (sonic-net/sonic-sairedis#1105) * 0aa60f5 [lgtm] Add uuid library (sonic-net/sonic-sairedis#1119) * e8a01a8 Add retry on zmq functions if fail with EINTR. (sonic-net/sonic-sairedis#1109) * 594b242 Add SAI_PORT_ATTR_OPER_SPEED support (sonic-net/sonic-sairedis#1107) * 4c9e048 Add Xsight specific syncd start options (sonic-net/sonic-sairedis#1112) * da26ace Run 20 vs tests at a time. (sonic-net/sonic-sairedis#1111) * ffc4109 [asan] suppress the static variable leaks (sonic-net/sonic-sairedis#1085) * bfd37e3 [sonic-sairedis] Support bulk counter (sonic-net/sonic-sairedis#1094) * 90ba09a Transfer organization from Azure to sonic-net (sonic-net/sonic-sairedis#1095) * 4853881 [BFN] Provide unified approach to select P4 profile based on chip family (sonic-net/sonic-sairedis#1089)
* [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 <yhuryk@nvidia.com> * [asan] add missing SWSS_LOG_ENTER() Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
* [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 <yhuryk@nvidia.com> * [asan] add missing SWSS_LOG_ENTER() Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
* [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 <yhuryk@nvidia.com> * [asan] add missing SWSS_LOG_ENTER() Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
This is to suppress ASAN false positives for static variables.
For example, the ServiceMethodTable::m_slots is sometimes reported as leaked.
ASAN report example: