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
Socket-leak in 'vquic/msh3.c' #8915
Comments
@nibanks when I just now reproduced this issue with valgrind on my curl+msh3 build, it certainly shows leaking memory. But the more primary problem I fell over is that I get a lot of "Conditional jump or move depends on uninitialised value(s)" errors from valgrind that overshadow the leak and that make it hard to work on the leak. I don't know yet if the leak is because of a curl bug or something msh3 should do. This test ran on a Debian Linux x86_64. Here is my valgrind output from a curl build on current git master: error.txt curl's output is here: I used this command line:
|
I'll take a look! |
I think the following would fix the
If you're able to add the new line to msh3.hpp to try while I look at the other error, I'd appreciate it. |
For this one, I'm not sure why it claims there is uninitialized memory access.
My first thought it that we're only partially initializing the memory that we actually want to send out, and then pass the length appropriate with what has been initialized. Would |
@nibanks once I bumped my build to nibanks/msh3@e30c9ce I don't see any more uninitialized warnings. Do you still see any issue? I still see a memory leak, but I'll work on that. |
@nibanks: question: the memory allocated here: Line 408 in 2f00566
... where is that freed again? Is that part of the connection so it gets freed with The reason I ask is that I see an occasional memory leak that valgrind reports like this (line numbers from my slightly edited dev version):
|
It looks like we're missing a call to You just need to call that when you're done with the request. Though, I'm not 100% positive when that is in your interface. |
Ok, thanks. I'm on it. |
And free request related memory better in 'done'. Fixes a memory-leak. Reported-by: Gisle Vanem Fixes #8915
And free request related memory better in 'done'. Fixes a memory-leak. Reported-by: Gisle Vanem Fixes #8915
Building with most options enabled and doing:
gives:
Open file descriptor created at connect.c:1632
The text was updated successfully, but these errors were encountered: