-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
fsanitize emits memory leaks errors #76
Comments
I made some verification and the memory leak is not due to the foreach macro itself, but it's from the "polymorophic" function call There are some vectors stored in map that that are not properly freed. Now, I remember that I did it on purpose to avoid to make complex memory management in that case (considering the fact we are in a test library and leaks are negligible related to data related to library itself and that data are just stored once and then freed at the end of test execution) Anyhow, this could be improved |
Hello,
when compiling with sanitizers (I used memory, leaks, and undefined), I get a memory leak during the call to the following macro call (I guess it returns early and some temporary malloc is not freed)
I tried to fix it by using various free functions but did not manage to make it pass the CI tests. I'm probably missing some understanding in here. In particular I tried adding
on the other branch of the if but I guess it frees too much (it indeed removes the memory leak but..... then no test is executed anymore in the CI...).
To add the sanitizers you can add the following lines in the CMakeLists.txt files:
Edit: formatting.
The text was updated successfully, but these errors were encountered: