From feef1bc02b5a10eaa6fdbd33635810a09f9c4601 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Sat, 25 Jan 2025 19:45:40 +0100
Subject: [PATCH] ci/linux: enable leak detector

The leak detector has been disabled due to a libass leak that was
causing the test to fail. I initially expected this change to be
temporary until a patch release of libass became available and we could
update it. However, it has been a few months without a release. Instead
of waiting, re-enable the leak detector and add a suppression file for
this specific leak.

Fixes: d6eb85bb1a027aa52a7f48b162757763c9dcc875
---
 .github/workflows/build.yml | 2 +-
 .lsan_suppressions          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 .lsan_suppressions

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4a38c73a14..468ccd9eaf 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -290,7 +290,6 @@ jobs:
       env:
         CC: "${{ matrix.config.cc }}"
         CXX: "${{ matrix.config.cxx }}"
-        ASAN_OPTIONS: "halt_on_error=1:abort_on_error=1:print_summary=1:detect_leaks=0"
     strategy:
       matrix:
         config:
@@ -318,6 +317,7 @@ jobs:
       - name: Run meson tests
         id: tests
         run: |
+          export LSAN_OPTIONS="suppressions=${GITHUB_WORKSPACE}/.lsan_suppressions"
           meson test -C build
 
       - name: Print meson test log
diff --git a/.lsan_suppressions b/.lsan_suppressions
new file mode 100644
index 0000000000..e2c3594b84
--- /dev/null
+++ b/.lsan_suppressions
@@ -0,0 +1 @@
+leak:FcFontSetSort