From 9033cfb4c97ac52ba45cdb1612e5a59ea168beea Mon Sep 17 00:00:00 2001 From: vaughnbetz Date: Wed, 28 Jul 2021 21:15:36 -0400 Subject: [PATCH 1/3] Update README.developers.md Added sanitizer suppression file info, and mention of valgrind. --- README.developers.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.developers.md b/README.developers.md index 2c77340d932..26d2aebb540 100644 --- a/README.developers.md +++ b/README.developers.md @@ -934,6 +934,21 @@ $ 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: +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 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 +valgrind --leak-check=full --suppressions=$VTR_ROOT/vpr/valgrind.supp vpr [... usual vpr options here ...] +``` +where $VTR_ROOT is the root directory of your vtr source code tree. 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 run on pull requests. + ## Assertion Levels VTR supports configurable assertion levels. From 364a22f6165338c9e9f477766ef152f1eb32b881 Mon Sep 17 00:00:00 2001 From: vaughnbetz Date: Wed, 28 Jul 2021 21:28:12 -0400 Subject: [PATCH 2/3] Update README.developers.md Added a bit more info to the valgrind and sanitizers. --- README.developers.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.developers.md b/README.developers.md index 26d2aebb540..5a047183388 100644 --- a/README.developers.md +++ b/README.developers.md @@ -935,7 +935,9 @@ $ 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 on pull requests turn on sanitizers (currently S: Basic and R: Odin-II Basic Tests) @@ -943,9 +945,10 @@ Note that some of the continuous integration (CI) regtests run on pull requests ## 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 -valgrind --leak-check=full --suppressions=$VTR_ROOT/vpr/valgrind.supp vpr [... usual vpr options here ...] +#From the VTR root directory +valgrind --leak-check=full --suppressions=./vpr/valgrind.supp ./vpr/vpr [... usual vpr options here ...] ``` -where $VTR_ROOT is the root directory of your vtr source code tree. The suppression file included in the command above will suppress reporting of known memory leaks in libraries included by vpr. +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 run on pull requests. From 5013c76dfee2b577b0948e3e319bcb55ef2d9fb0 Mon Sep 17 00:00:00 2001 From: vaughnbetz Date: Thu, 29 Jul 2021 11:19:38 -0400 Subject: [PATCH 3/3] Update README.developers.md Small wording changes to valgrind/sanitizers. --- README.developers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.developers.md b/README.developers.md index 5a047183388..ab18e7967eb 100644 --- a/README.developers.md +++ b/README.developers.md @@ -940,7 +940,7 @@ 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 on pull requests turn on sanitizers (currently S: Basic and R: Odin-II Basic Tests) +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 @@ -950,7 +950,7 @@ valgrind --leak-check=full --suppressions=./vpr/valgrind.supp ./vpr/vpr [... usu ``` 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 run on pull requests. +Note that valgrind is run on some flows by the continuous integration (CI) tests. ## Assertion Levels VTR supports configurable assertion levels.