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

Memory leak in main/runtime/bin/security_context_macos.cc #53113

Closed
sergiy-sc opened this issue Aug 3, 2023 · 1 comment
Closed

Memory leak in main/runtime/bin/security_context_macos.cc #53113

sergiy-sc opened this issue Aug 3, 2023 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io P2 A bug or feature request we're likely to work on

Comments

@sergiy-sc
Copy link

I think there is a memory leak in
https://github.com/dart-lang/sdk/blob/main/runtime/bin/security_context_macos.cc#L118

STACK_OF(X509)* unverified = sk_X509_dup(SSL_get_peer_full_cert_chain(ssl));

is never freed with sk_X509_free

and the same is here: https://github.com/dart-lang/sdk/blob/main/runtime/bin/security_context_macos.cc#L132
I found it when I was looking at the leaks in my Flutter application.

@mraleph
Copy link
Member

mraleph commented Aug 4, 2023

/cc @aam @brianquinlan

@mraleph mraleph added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io labels Aug 4, 2023
@a-siva a-siva added the P2 A bug or feature request we're likely to work on label Aug 9, 2023
copybara-service bot pushed a commit that referenced this issue Aug 11, 2023
BUG=#53113
TEST=leaks --atExit -- xcodebuild/DebugARM64/dart --sound-null-safety -Dtest_runner.configuration=vm-mac-debug-arm64 --packages=$DH/.dart_tool/package_config.json $DH/tests/standalone/io/https_bad_certificate_test.dart

Change-Id: Ie9ba76a507c42879206929a42071c0a1a8c6ceaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319080
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
@a-siva a-siva closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-io P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

4 participants