-
Notifications
You must be signed in to change notification settings - Fork 543
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][aclorch] fix a memory leak in the SaiAttrWrapper::swap() #2382
Conversation
* fix a leak caused by overriding this->m_attr (which contained a dynamically allocated list) in the SaiAttrWrapper::swap() Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@Yakiv-Huryk , is there any existing test that covers this part of the code? @theasianpianist , Is this due to optimization? |
Probably an optimization issue, looks like the method is being hit but the object code from the compiler does not line up exactly with the source code. |
/EasyCLA |
in this case can we merge it regardless? |
/easycla |
Merging as the diff coverage possibly is impacted by optimization. |
fix a leak caused by overriding this->m_attr (which contained a dynamically allocated list) in the SaiAttrWrapper::swap()
ASAN report:
orchagent
What I did
Fixed the logic in the SaiAttrWrapper::swap()
Why I did it
To fix a memory leak
How I verified it
Run a DVS test with ASAN that found the bug
Details if related