-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
detect memory leaks with mbedtls-3.5 #3177
Comments
Does the problem still exist on main branch? It sounds like an internal allocation from mbedtls side that either didn't used to exist or was freed somewhere else before exit on earlier versions. There's this but doesn't seem like a great fit Mbed-TLS/mbedtls#3486 |
This really seems like a change in mbedtls allocating something in its entropy function that now has to be freed in a step we didn't have to do on mbedtls earlier than 3.5. You're better off asking mbedtls since without a crystal ball we can't know that later versions of mbedtls than exist at the time we integrated them are later going to start doing that. They should tell you that "you now need to free those allocations by calling xxx" and then you can provide a patch on lws to do that (preferably included after checking MBEDTLS version requires it). |
Hi,
I built lws-4.3-stable with mbedtls-3.5.2, ASAN option OPEN.
![image](https://private-user-images.githubusercontent.com/31056281/345355039-09b3dd00-6aa9-4681-9169-d5dc57c18882.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MzY3MTYsIm5iZiI6MTcyMjgzNjQxNiwicGF0aCI6Ii8zMTA1NjI4MS8zNDUzNTUwMzktMDliM2RkMDAtNmFhOS00NjgxLTkxNjktZDVkYzU3YzE4ODgyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA1VDA1NDAxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4YWFlYWIwODQ2MmFjMDI1NTU0ZjQyYjUzYjNiNDlhOGFkMDk4ZThmNWUzZTdiNjY0MTc3MjhkZGI3YmRjYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6UKmw89OBmwBdFOEanq06PACXT-n8XqDWtNOksuSD3A)
When I ran the lws-minimal-ws-client-ping demo,I found a memory leak warning below:
Then I rebuilt the lws demo with mbedtls-3.2.1, the warning is gone, so I guess this is a new version adapting problem.
I tried several ways to fix it but failed, so I report this issue instead, hope it will help~
The text was updated successfully, but these errors were encountered: