aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorErik Hennig <github@erik-hennig.me>2024-06-17 12:00:22 +0200
committerGitHub <noreply@github.com>2024-06-17 10:00:22 +0000
commitbea181f5d52c8ac088328f72dc36ef503a5420a9 (patch)
tree89d43deaa1281055a39cc0f3934baffd23f5af15 /python/servo/command_base.py
parent2c0d0d57b100ea08824839a2d52beb2b3f1448fc (diff)
downloadservo-bea181f5d52c8ac088328f72dc36ef503a5420a9.tar.gz
servo-bea181f5d52c8ac088328f72dc36ef503a5420a9.zip
asan: Add a leak suppression file with known false positives (#32511)
Co-authored-by: Jonas Zeunert <jonas@zeunert.org>
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 0c81c8d7ab7..2fd48512eb0 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -43,6 +43,7 @@ import servo.util as util
from servo.util import download_file, get_default_cache_dir
NIGHTLY_REPOSITORY_URL = "https://servo-builds2.s3.amazonaws.com/"
+ASAN_LEAK_SUPPRESSION_FILE = "support/suppressed_leaks_for_asan.txt"
@dataclass
@@ -519,6 +520,9 @@ class CommandBase(object):
# Argument-less str.split normalizes leading, trailing, and double spaces
env['RUSTFLAGS'] = " ".join(env['RUSTFLAGS'].split())
+ # Suppress known false-positives during memory leak sanitizing.
+ env["LSAN_OPTIONS"] = f"{env.get('LSAN_OPTIONS', '')}:suppressions={ASAN_LEAK_SUPPRESSION_FILE}"
+
self.build_android_env_if_needed(env)
return env