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.
18 lines
303 B
C++
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
|