-
Notifications
You must be signed in to change notification settings - Fork 280
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 under Windows #49
Comments
OK. Can you retest with the current code? If the problem persists, could you share your test program? |
Аnd I am on windows with msys2. I cant find netinet6 with headers files. What is the name of such library for netinet6? |
I guess the files are in |
OK, found the test program. Wasn't reading the screenshot... We will test it. |
I added a simple test program test_libmgmt.c and it doesn't show any leaks on Linux. We will test it on Windows next week. Please note that you must use
instead of
in your test program. If usrsctp_finish() does return a non-zero value, the stack is not cleaned up and you might leak memory when just calling usrsctp_init() again. |
Okay. I don't have access to my Windows machine now, but I'll test it on Monday and let you know. |
I now see where the leak occurs on Windows. It doesn't occur on other platforms. Need to think about a correct way of fixing it. Will let you know when I think the issue is fixed. |
@tuexen: just out of curiosity, where is the leak that you said you saw? |
The allocations in |
OK. This should be fixed now. Can you retest? |
@tuexen: Yes, it appears to be no longer leaking. Thanks so much for your help! |
This is after applying this PR: #48
I'm not really familiar with Windows, so I could be doing something wrong, but it appears there may be leaks some place else.
The Windows UMDH utility seems to point to some suspicious parts in sctp_init_ifns_for_vrf():
https://github.com/sctplab/usrsctp/blob/master/usrsctplib/netinet/sctp_bsd_addr.c#L356-L362 and
https://github.com/sctplab/usrsctp/blob/master/usrsctplib/netinet/sctp_bsd_addr.c#L404-L409.
Here's the UMDH log from the test program I used:
stackdiff.txt
The text was updated successfully, but these errors were encountered: