[asan] Add address sanitizer support.#9857
Merged
liat-grozovik merged 3 commits intosonic-net:masterfrom Feb 9, 2022
Merged
Conversation
282eecc to
cdbac50
Compare
dgsudharsan
previously approved these changes
Jan 26, 2022
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
previously approved these changes
Jan 27, 2022
Contributor
prsunny
left a comment
There was a problem hiding this comment.
lgtm, request Qi/Ying to review as well
yxieca
reviewed
Jan 27, 2022
Implement infrastructure that allows enabling address sanitizer for docker containers. Enable address sanitizer for SWSS container. Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
509aa83
cdbac50 to
509aa83
Compare
yxieca
approved these changes
Jan 28, 2022
Collaborator
|
@oleksandrivantsiv please resolve conflicts so we can merge following the approval by Ying |
6 tasks
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.
Implement infrastructure that allows enabling address sanitizer
for docker containers. Enable address sanitizer for SWSS container.
Why I did it
To add a possibility to compile SONiC applications with address sanitizer (ASAN).
ASAN is a memory error detector for C/C++. It finds:
How I did it
By adding new ENABLE_ASAN configuration option.
How to verify it
By default ASAN is disabled and the SONiC image is not affected.
When ASAN is enabled it inspects all allocation, deallocation, and memory usage that the application does in run time. To verify whether the application has memory errors tests that trigger memory usage of the application should be run. Ideally, the whole regression tests should be run. Memory leaks reports will be placed in /var/log/asan/ directory of SONiC host OS.
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)