-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix: libcontainer/handler.go potential memory leak #3447
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hi @cl0udee. Thanks for your PR. I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
8b7cb5d
to
8bd9643
Compare
/ok-to-test |
/assign @bobbypage |
Can you please explain why this fixes the memory leak? Why does cloning the string fix the issue? Can you provide a pprof maybe? |
Here are two pprof files that analyze the memory usage of the code: The first one is the unoptimized original code.
From line 501, it can be observed that the variable To prevent the aforementioned case, use
|
@bobbypage Hi, I hope everything is going well. Just wanted to check in and see if there's any update on the progress of this Pull Request. Thank you! |
/test all |
fix issue: #3446
Use the
strings.Clone
function to makedevName
no longer referencefields[0]
.