Skip to content

Commit f536a13

Browse files
authored
Merge pull request #1809 from verilog-to-routing/vaughnbetz-valgrind-sanitizer_doc
Update README.developers.md : Added sanitizer suppression file info, and mention of valgrind.
2 parents d3449e8 + 5013c76 commit f536a13

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.developers.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,24 @@ $ cmake -D VTR_ENABLE_SANITIZE=ON build
934934
$ make
935935
```
936936

937+
You can suppress reporting of known memory leaks in libraries used by vpr by setting the environment variable below:
938+
```shell
939+
LSAN_OPTIONS=suppressions=$VTR_ROOT/vpr/lsan.supp
940+
```
941+
where $VTR_ROOT is the root directory of your vtr source code tree.
942+
943+
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)
944+
945+
## Valgrind
946+
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
947+
```shell
948+
#From the VTR root directory
949+
valgrind --leak-check=full --suppressions=./vpr/valgrind.supp ./vpr/vpr [... usual vpr options here ...]
950+
```
951+
The suppression file included in the command above will suppress reporting of known memory leaks in libraries included by vpr.
952+
953+
Note that valgrind is run on some flows by the continuous integration (CI) tests.
954+
937955
## Assertion Levels
938956
VTR supports configurable assertion levels.
939957

0 commit comments

Comments
 (0)