Memory Leaks on Failure Cases #232
Closed
jacobmealey
started this conversation in
General
Replies: 2 comments
-
Generally I think it is a good idea to fix them, even if it short-term makes no difference if they happen on exit.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Update: I realized this morning that I was testing on the branch for #231 which I had patched a more serious memory leak. on master it's about 55 test failures and many not on failure cases! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In doing some testing for 11674 and #231 I've noticed that trurl leaks memory on many of it's failure cases because it exits immediately without cleaning up any of the libcurl stuff. I know the OS should clean up any leftover memory, but I don't like the idea of leaking memory at all. Is this something we should try to address? I was doing most of my testing with debug enabled in curl so it makes sense that valgrind didn't detect the leaks before, because it couldn't see into the libcurl calls.
If you are interested in reproducing the memory leaks I've found heres the steps i did:
./configure --disable-shared --enable-debug --enable-maintainer-mode --prefix $HOME/.curl --with-openssl
make install
.~/.curl
by replacing thecurl-config
calls with~/.curl/bin/curl-config
in the Makefile and runmake test-memory
I'm reporting 7 tests fail, but they are all testing trurls error handling.
What I want to ask everyone is do we think these memory leaks should be addressed, or is it fine to say "let the os handle that"?
Beta Was this translation helpful? Give feedback.
All reactions