Open ardasener opened 2 years ago
An alternative to valgrind
would be Address Sanitizer. A particular issue with leak checking, in general, is that we might get leaks from external libraries we depend on that we can't control. So it can't be as simple as running the leak checker and checking the exit code. We might want to use a script that actually reads the output and checks the origins of the leaks.
Our current automated testing system has no way of detecting memory leaks caused by the library. As a result, I will be adding a setting to the run_all_examples.py file which will allow the examples to be run using the valgrind tool and I will configure Github Actions to run with this setting turned on in the Ubuntu runtime.
While this is not the most complete solution, it is probably the fastest one to implement. If this turns out to be not enough, we can reconsider researching ways to integrate leak checking into Gtest.
If you disagree or have any feedback regarding this issue, feel free to comment here.