-
-
Notifications
You must be signed in to change notification settings - Fork 178
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 memory leak when creating and destroying a lot of context #790
Conversation
Motivation: During introducing #759 I missed to add a free call which did introduce a small memory leak. This was not noticable for most users as creating and destroying of SSL context is usually very rare. That said some users might still do this and so notice the leak. Modifications: - Add missing free(...) call to match calloc(...) - Move code of one function to the other as it was the only calling function. This simplifies the code and makes it less error-prone Result: Fixes #788
/cc @slandelle @notdryft |
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.
@normanmaurer you can give a shot to the async profiler native memory leak branch!
We're currently testing it against the async profiler nativemem mode ourselves! |
I could not reproduce a leak anymore with this pulled in. Once you confirm it as well I will do a release |
Great @notdryft let me know if that worked too! |
Motiviation: In the past we removed the usage of apr by static linking against stdc++. While at first this seemed like a good idea it has proven to introduce problems on various platforms. Because of these problems we should better revert the changes and just link against apr again. Modifications: - Revert "Fix memory leak when creating and destroying a lot of context (#790)" fd8fb2a. - Revert "Fix possible corruption / segfault when using atomics (#774)" 11ff708. - Revert "Fix segfault which was caused by not creating the ticket_keys_new atomic (#772)" 196f935. - Revert "Fix format usage" eecaaa8. - Revert "Link libstdc++ statically on linux" a288f03. - Revert "rename functions for consistency" 7ee7804. - Revert "Remove dependency on apr by using c++11 / c++14 features" 8740651. Result: Fixes #798 , #789
Motiviation: In the past we removed the usage of apr by static linking against stdc++. While at first this seemed like a good idea it has proven to introduce problems on various platforms. Because of these problems we should better revert the changes and just link against apr again. Modifications: - Revert "Fix memory leak when creating and destroying a lot of context (#790)" fd8fb2a. - Revert "Fix possible corruption / segfault when using atomics (#774)" 11ff708. - Revert "Fix segfault which was caused by not creating the ticket_keys_new atomic (#772)" 196f935. - Revert "Fix format usage" eecaaa8. - Revert "Link libstdc++ statically on linux" a288f03. - Revert "rename functions for consistency" 7ee7804. - Revert "Remove dependency on apr by using c++11 / c++14 features" 8740651. - Update APR version Result: Fixes #798 , #789
Motivation:
During introducing #759 I missed to add a free call which did introduce a small memory leak. This was not noticable for most users as creating and destroying of SSL context is usually very rare. That said some users might still do this and so notice the leak.
Modifications:
Result:
Fixes #788