[asan] suppress the static variable leaks#1085
Merged
kcudnik merged 2 commits intosonic-net:masterfrom Aug 9, 2022
Merged
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 <[email protected]>
kcudnik
requested changes
Jul 21, 2022
Comment on lines
+6
to
+11
| extern "C" { | ||
| const char* __lsan_default_suppressions() { | ||
| return "leak:__static_initialization_and_destruction_0\n"; | ||
| } | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
this sounds really bad, you are implementing missing import here, why this way ?
Contributor
Author
There was a problem hiding this comment.
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).
kcudnik
previously approved these changes
Jul 21, 2022
Collaborator
|
please fix build errors |
Signed-off-by: Yakiv Huryk <[email protected]>
kcudnik
approved these changes
Jul 22, 2022
Collaborator
|
@kcudnik could you please help to merge? |
7 tasks
7 tasks
dprital
added a commit
to dprital/sonic-buildimage
that referenced
this pull request
Aug 29, 2022
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 <[email protected]>
7 tasks
mlorrillere
pushed a commit
to mlorrillere/sonic-buildimage
that referenced
this pull request
Sep 8, 2022
* 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)
pettershao-ragilenetworks
pushed a commit
to pettershao-ragilenetworks/sonic-sairedis
that referenced
this pull request
Nov 18, 2022
* [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]>
Yakiv-Huryk
added a commit
to Yakiv-Huryk/sonic-sairedis
that referenced
this pull request
Nov 24, 2022
* [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]>
Yakiv-Huryk
added a commit
to Yakiv-Huryk/sonic-sairedis
that referenced
this pull request
Dec 6, 2022
* [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]>
bingwang-ms
pushed a commit
that referenced
this pull request
Jan 3, 2023
* [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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to suppress ASAN false positives for static variables.
For example, the ServiceMethodTable::m_slots is sometimes reported as leaked.
ASAN report example: