Use valgrind to simplify no-leak regression testing #72
Labels
good first issue
Good for newcomers
help wanted
Looking for contributors (ideas, comments, code, etc)
Milestone
Seems like we can detect leaks using valgrind:
And If I manually comment out a
free()
call on anffi.Pointer
(e.g. inbox.count()
), it shows a leak:Similarly, when I comment out a call to
obx_query_close()
and run valgrind on the query-test, it catches a leak of the core resources as well:Therefore, it is clear it can help detect leaks that could be potentially introduced in the future code changes. There is also a load of
Warning: set address range perms: large range
andmismatched free() / delete / delete []
reports but I don't think those are related to our code, at least for the latter. That would require further investigation though.Goal
Create a script for project developers and CI. The script:
/test/*_test.dart
files usingdart2native
valgrind
The script should ideally return a non-zero code in case of an error, so it can easily be used in the CI.
The text was updated successfully, but these errors were encountered: