From d2a864dfe799d542441701af8d86fdc3b3ba1789 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 12 Nov 2024 17:50:58 +0000 Subject: [PATCH] Add lsan.supp ...so suppress errors from ASAN with EGL renderer. Also add a script to simplify running with sanitizer and this suppression file. Related-to: #2331 --- scripts/asan_leak_suppressions | 1 + scripts/run-with-asan.sh | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 scripts/run-with-asan.sh diff --git a/scripts/asan_leak_suppressions b/scripts/asan_leak_suppressions index 6ac2d14a..383a42da 100644 --- a/scripts/asan_leak_suppressions +++ b/scripts/asan_leak_suppressions @@ -1 +1,2 @@ leak:libfontconfig.so +leak:libEGL_mesa.so diff --git a/scripts/run-with-asan.sh b/scripts/run-with-asan.sh new file mode 100755 index 00000000..93dbd062 --- /dev/null +++ b/scripts/run-with-asan.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +: ${BUILD_DIR="build"} + +[ -d "${BUILD_DIR}" ] || meson setup "${BUILD_DIR}" +meson configure -Db_sanitize=address,undefined "${BUILD_DIR}" +ninja -C "${BUILD_DIR}" +LSAN_OPTIONS=suppressions=scripts/asan_leak_suppressions "${BUILD_DIR}/labwc" -d 2>log.txt +