ladybird/Services/ImageDecoder/LeakSanitizer.cpp
Andreas Kling e83836b928 ImageDecoder: Disable LSan in the sandboxed helper
Keep the ImageDecoder sandbox available in sanitizer builds, but opt the
helper out of LeakSanitizer process-exit leak scans. LSan inspects
procfs during that scan, which conflicts with the helper filesystem
sandbox.

Skip the glibc malloc arena tweak under ASan as well, since ASan's
allocator makes mallopt(M_ARENA_MAX) fail and does not need that glibc
runtime workaround.
2026-06-09 19:35:09 +02:00

18 lines
303 B
C++

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Platform.h>
#if defined(HAS_ADDRESS_SANITIZER) && defined(AK_OS_LINUX)
extern "C" {
int __lsan_is_turned_off();
[[gnu::used]] int __lsan_is_turned_off()
{
return 1;
}
}
#endif