# LeakSanitizer suppressions for AfterAPro, used by `make asan-test`.
#
# Every entry is a library outside this program that allocates once and never
# frees: the graphics stack, the font cache, the compute driver. They are
# reported on every run of any Allegro program on this host and they drown a
# real finding.
#
# Nothing from AfterAPro or from nilorea-library belongs in this file. A leak
# whose stack mentions src/ or nilorea-library/src/ is ours and gets fixed,
# never suppressed.
#
# Use with: LSAN_OPTIONS=suppressions=tests/asan-suppressions.txt

# The display: fontconfig, Mesa, DRM and the X protocol libraries.
leak:libfontconfig
leak:libGLX_mesa
leak:libGLX
leak:libEGL
leak:libgallium
leak:libdrm
leak:libdrm_amdgpu
leak:libxcb
leak:libX11

# AMD's OpenCL stack: allocations made while a device is set up and held for
# the life of the process. Seen in test_accel, 408 bytes in 6 allocations.
# Its threads also replace the alternate signal stack ASan gives each thread,
# which used to make ASan die on thread teardown; `make asan-test` passes
# use_sigaltstack=0 for that (Makefile).
leak:libhsa-runtime64
leak:libhsakmt
leak:libamdocl64

# glib, which AfterAPro never calls itself: it arrives through lensfun and
# through Allegro's GTK file dialogs. Seen in test_lens: lensfun's
# lfDatabase::Load() builds a file name with g_build_filename and never frees
# it, 128 bytes. By library rather than by that function because the stack
# LeakSanitizer keeps is cut at glib's frames, which have no frame pointers;
# lensfun's database itself is AfterAPro's, held for the life of the process
# and so never reported.
leak:libglib-2.0
