-
Notifications
You must be signed in to change notification settings - Fork 45
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 detected by AddressSanitizer #469
Comments
P.S.: OpenSSL normally works well with AddressSanitizer as far as I've looked in the net, so there should be somehting wrong with |
Here's a quick fix: add Your example of enabling leak detection is very useful. This is how I compiled Perl on a macOS with a Clang compiler from a homebrew installation. It's the same command as you used, but with a direct path pointing to
I then compiled Net::SSLeay as follows. Setting
To get useful reports I had to first set
Otherwise this is logged: I then run Perl like shown below:
File
A number of tests appear to skip calling |
Thank you for the answer.
This sounds strange for me, because I've successfully built perl itself, and all modules that go with it, using ASan sanitizer, and all tests have successfully passed. So I would doubt that such generic thing as But we can fix one thing in a time, so this is not critical...
I am still not good this perl building harness. I've googled that
Please let me know about your progress... I am going to have vacations in a week, and I planed to dedicate it to perl+ASan related issues, including looking into this module again. I have some openssl related experience. So keep me informed, so we do not do same things in the same time :-) |
I've suggested a fix for this problem: #473 This does not solve all ASan problems thought. Do not hurry with creating new release, I will continue dealing with these problems soon, and might provide new patches. |
I've checked with my perl, you do not need to add extra params here, (at least in linux) -g is provided by -DEBUGGING=both option given to perlbrew. And all build options when you build the module will be the same as they were when perl have been built. So nothing extra is needed. And if something is needed it should be added to perlbrew options.... |
Next question:
My question is: do we need some automatic free when |
Hi! I decided to test perl modules built with AddressSanitizer. I did not go very far, as I found out that
Net::SSLeay
fail tests when build with ASan. And it is needed for sending test reports :-)How to reproduce:
Using that perl install all
Net::SSLeay
dependencies from CPAN, and buildNet::SSLeay
itself. You will see that tests fails.Try to run following script using
Net::SSLeay
build in p.2:You will see that this script will cause memory leak reports if you've read from two sockets in a row. And will behave nice if there is only one socket is used (you need to use commented alternatice
@uris
line). The key to the problem is reading from socket. If you just write to it without reading, it will not leak to leaks.I have not dig into that problem yet, I've just find solid way to reproduce it. I suspect that there some kind of
OPENSSL_init_ssl
is called twice, or something like that.You know that code better then me, you have better chances to find the origin of the problem. But I will give it another try soon, I hope
The text was updated successfully, but these errors were encountered: