Skip to content
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 known memory leaks in self-talk tests #1600

Closed
Tracked by #3758
lrstewart opened this issue Feb 28, 2020 · 0 comments · Fixed by #4369
Closed
Tracked by #3758

Fix known memory leaks in self-talk tests #1600

lrstewart opened this issue Feb 28, 2020 · 0 comments · Fixed by #4369

Comments

@lrstewart
Copy link
Contributor

Problem:

We have this issue to figure out why valgrind doesn't find memory leaks, but in the meantime, I've had multiple PRs fail valgrind for random self-talk tests I didn't touch.

We should fix all the self-talk tests, which almost all have the same memory leak. They allocate memory for certs, but only free that memory in the server process, not the client process. Example: https://github.com/awslabs/s2n/blob/master/tests/unit/s2n_self_talk_test.c#L118-L119

Proposed Solution:

Go through all the tests/unit/s2n_self_talk_* tests and either:

  • Move the memory they allocate for certs to the stack. Example: lrstewart@7ed37b4
  • Call the common testlib function to setup the cert chain in the server process after the fork. Clean up at the end of the server process.
@zaherd zaherd added this to To do in General Enhancements via automation Jun 15, 2020
@dougch dougch added the s2n-core team label Mar 18, 2022
@zaherd zaherd removed this from To do in General Enhancements Nov 8, 2022
@zaherd zaherd added this to To do in 2023 Roadmap via automation Nov 8, 2022
2023 Roadmap automation moved this from To do to Closed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants