From 5305c33ec140f390ed2fb9b06a23ffec25347f52 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 7 Oct 2020 02:05:16 +0200 Subject: [PATCH] Add LeakSanitizer suppressions to skip libfontconfig warnings --- .lsan_suppressions | 1 + pm3 | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .lsan_suppressions diff --git a/.lsan_suppressions b/.lsan_suppressions new file mode 100644 index 000000000..6ac2d14a1 --- /dev/null +++ b/.lsan_suppressions @@ -0,0 +1 @@ +leak:libfontconfig.so diff --git a/pm3 b/pm3 index 771dce77d..429dfaba6 100755 --- a/pm3 +++ b/pm3 @@ -23,7 +23,11 @@ else # hope it's installed somehow, still not sure where fw images are... CLIENT="proxmark3" fi - +EVALENV="" +# LeakSanitizer suppressions +if [ -e .lsan_suppressions ]; then + EVALENV="export LSAN_OPTIONS=suppressions=.lsan_suppressions" +fi PM3LIST=() SHOWLIST=false @@ -212,7 +216,7 @@ function get_pm3_list_WSL { SCRIPT=$(basename -- "$0") if [ "$SCRIPT" = "pm3" ]; then - CMD() { $CLIENT "$@"; } + CMD() { eval "$EVALENV"; $CLIENT "$@"; } HELP() { cat << EOF