-
Notifications
You must be signed in to change notification settings - Fork 76
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
Valgrind report 'still reachable' warning on test_name #57
Comments
I pulled master and the leak is still happening. |
This is because it uses the fork subprocess to perform testing, and after the subprocess completes the testing, it stops directly. ==8031== part is the child process of fork, while the ==8028== part is the main process. The following is a code example to demonstrate the reason
save code to hello.c.
You will see similar output below
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have strange behavior with
valgrind
. Basically, I defined my test suite as follow:But, the problem is that
valgrind
detect a "still reachable" memory area in each process. For example the last test gives:Note that the size of the "still reachable" memory area is exactly the size of the string enclosing the name of the test (plus the
\0
character at the end).One way to make the error vanish seems to simply declare the test suite as follow:
The root name of the test suite is empty and this time valgrind gives a clean report for each test:
I tried to see what was the problem but couldn't find a good way to solve it (everything seems to be linked to the
munit_maybe_free_concat(()
function).The text was updated successfully, but these errors were encountered: