diff --git a/README.developers.md b/README.developers.md index 2c77340d932..ab18e7967eb 100644 --- a/README.developers.md +++ b/README.developers.md @@ -934,6 +934,24 @@ $ cmake -D VTR_ENABLE_SANITIZE=ON build $ make ``` +You can suppress reporting of known memory leaks in libraries used by vpr by setting the environment variable below: +```shell +LSAN_OPTIONS=suppressions=$VTR_ROOT/vpr/lsan.supp +``` +where $VTR_ROOT is the root directory of your vtr source code tree. + +Note that some of the continuous integration (CI) regtests (run automatically on pull requests) turn on sanitizers (currently S: Basic and R: Odin-II Basic Tests) + +## Valgrind +An alternative way to run vtr programs to check for invalid memory accesses and memory leaks is to use the valgrind tool. valgrind can be run on any build except the sanitized build, without recompilation. For example, to run on vpr use +```shell +#From the VTR root directory +valgrind --leak-check=full --suppressions=./vpr/valgrind.supp ./vpr/vpr [... usual vpr options here ...] +``` +The suppression file included in the command above will suppress reporting of known memory leaks in libraries included by vpr. + +Note that valgrind is run on some flows by the continuous integration (CI) tests. + ## Assertion Levels VTR supports configurable assertion levels.