mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1587463 - Remove LSan/UBSan suppressions option from automation. r=ahal
Depends on D48786 Differential Revision: https://phabricator.services.mozilla.com/D48787 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2d9d1fdf77
commit
a157a20300
@ -1,80 +0,0 @@
|
||||
### !!! Please do not add suppressions for new leaks in Gecko code, unless they are intentional !!!
|
||||
|
||||
###
|
||||
### Some of these leak in every test run.
|
||||
###
|
||||
|
||||
# LSan runs with a shallow stack depth and no debug symbols, so some small intentional
|
||||
# leaks in system libraries show up with this. You do not want this enabled
|
||||
# when running locally with a deep stack, as it can catch too much.
|
||||
leak:libc.so
|
||||
|
||||
# nsComponentManagerImpl intentionally leaks factory entries, and probably some other stuff.
|
||||
leak:nsComponentManagerImpl
|
||||
# These two variants are needed when fast unwind is disabled and stack depth is limited.
|
||||
leak:mozJSComponentLoader::LoadModule
|
||||
leak:nsNativeModuleLoader::LoadModule
|
||||
|
||||
# Bug 981220 - Pixman fails to free TLS memory.
|
||||
leak:pixman_implementation_lookup_composite
|
||||
|
||||
# Bug 987918 - Font shutdown leaks when CLEANUP_MEMORY is not enabled.
|
||||
leak:libfontconfig.so
|
||||
leak:GI___strdup
|
||||
# The symbol is really __GI___strdup, but if you have the leading _, it doesn't suppress it.
|
||||
|
||||
# Bug 1078015 - If the process terminates during a PR_Sleep, LSAN detects a leak
|
||||
leak:PR_Sleep
|
||||
|
||||
# Bug 1363976 - Stylo holds some global data alive forever.
|
||||
leak:style::global_style_data
|
||||
|
||||
###
|
||||
### Many leaks only affect some test suites. The suite annotations are not checked.
|
||||
###
|
||||
|
||||
# Bug 979928 - WebRTC leaks in different mochitest suites.
|
||||
leak:NR_reg_init
|
||||
# nr_reg_local_init should be redundant with NR_reg_init, but on Aurora
|
||||
# we get fewer stack frames for some reason.
|
||||
leak:nr_reg_local_init
|
||||
leak:r_log_register
|
||||
leak:nr_reg_set
|
||||
|
||||
# This is a one-time leak in mochitest-bc, so it is probably okay to ignore.
|
||||
leak:GlobalPrinters::InitializeGlobalPrinters
|
||||
leak:nsPSPrinterList::GetPrinterList
|
||||
|
||||
# Bug 1028456 - Various NSPR fd-related leaks in different mochitest suites.
|
||||
leak:_PR_Getfd
|
||||
|
||||
# Bug 1028483 - The XML parser sometimes leaks an object. Mostly happens in toolkit/components/thumbnails.
|
||||
leak:processInternalEntity
|
||||
|
||||
# Bug 1187421 - NSS does not always free the error stack in different mochitest suites.
|
||||
leak:nss_ClearErrorStack
|
||||
|
||||
###
|
||||
### Leaks with system libraries in their stacks. These show up across a number of tests.
|
||||
### Better symbols and disabling fast stackwalking may help diagnose these.
|
||||
###
|
||||
|
||||
leak:libcairo.so
|
||||
leak:libdl.so
|
||||
leak:libdricore.so
|
||||
leak:libdricore9.2.1.so
|
||||
leak:libGL.so
|
||||
leak:libglib-2.0.so
|
||||
leak:libglsl.so
|
||||
leak:libp11-kit.so
|
||||
leak:libpixman-1.so
|
||||
leak:libpulse.so
|
||||
# lubpulsecommon 1.1 is Ubuntu 12.04
|
||||
leak:libpulsecommon-1.1.so
|
||||
# lubpulsecommon 1.1 is Ubuntu 16.04
|
||||
leak:libpulsecommon-8.0.so
|
||||
leak:libresolv.so
|
||||
leak:libstdc++.so
|
||||
leak:libXrandr.so
|
||||
leak:pthread_setspecific_internal
|
||||
leak:swrast_dri.so
|
@ -1,21 +0,0 @@
|
||||
# Bug 931149
|
||||
race:DoImageDataComplete
|
||||
|
||||
# Bug 939786
|
||||
race:_pt_root
|
||||
|
||||
# Bug 939788
|
||||
# Tracked by http://code.google.com/p/thread-sanitizer/issues/detail?id=40
|
||||
race:ELMCreationDetector
|
||||
|
||||
# Bug 939790
|
||||
race:xpcom/components/nsComponentManager.h
|
||||
|
||||
# Bug 939807
|
||||
race:ComputeUTCTime
|
||||
|
||||
# Bug 939805
|
||||
race:g_variant_type_info_get
|
||||
|
||||
# Bug 844759
|
||||
race:js::gc::ArenaLists::allocateFromArenaInline
|
@ -1,15 +0,0 @@
|
||||
# This list contains runtime suppression entries for any issues reported
|
||||
# by UndefinedBehaviorSanitizer (UBSan). Unlike the compile-time blacklists,
|
||||
# this list allows us to blacklist source code files and functions only for
|
||||
# specific checks performed by UBSan.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# signed-integer-overflow:file-with-known-overflow.cpp
|
||||
# alignment:function_doing_unaligned_access
|
||||
# vptr:shared_object_with_vptr_failures.so
|
||||
#
|
||||
# Since runtime suppressions are much more expensive than compile-time
|
||||
# blacklisting, this list should not be used for frequent issues but rather
|
||||
# only for sporadic warnings that have already been checked and confirmed
|
||||
# to not be bugs.
|
@ -85,8 +85,6 @@ BROWSER_CHROME_MANIFESTS += [
|
||||
TEST_HARNESS_FILES.testing.mochitest += [
|
||||
'/build/mobile/remoteautomation.py',
|
||||
'/build/pgo/server-locations.txt',
|
||||
'/build/sanitizers/lsan_suppressions.txt',
|
||||
'/build/sanitizers/ubsan_suppressions.txt',
|
||||
'/build/valgrind/cross-architecture.sup',
|
||||
'/build/valgrind/i386-pc-linux-gnu.sup',
|
||||
'/build/valgrind/x86_64-pc-linux-gnu.sup',
|
||||
|
@ -1628,21 +1628,15 @@ toolbar#nav-bar {
|
||||
def buildBrowserEnv(self, options, debugger=False, env=None):
|
||||
"""build the environment variables for the specific test and operating system"""
|
||||
if mozinfo.info["asan"] and mozinfo.isLinux and mozinfo.bits == 64:
|
||||
lsanPath = SCRIPT_DIR
|
||||
useLSan = True
|
||||
else:
|
||||
lsanPath = None
|
||||
|
||||
if mozinfo.info["ubsan"]:
|
||||
ubsanPath = SCRIPT_DIR
|
||||
else:
|
||||
ubsanPath = None
|
||||
useLSan = False
|
||||
|
||||
browserEnv = self.environment(
|
||||
xrePath=options.xrePath,
|
||||
env=env,
|
||||
debugger=debugger,
|
||||
lsanPath=lsanPath,
|
||||
ubsanPath=ubsanPath)
|
||||
useLSan=useLSan)
|
||||
|
||||
if hasattr(options, "topsrcdir"):
|
||||
browserEnv["MOZ_DEVELOPER_REPO_DIR"] = options.topsrcdir
|
||||
|
@ -85,7 +85,7 @@ def _raw_log():
|
||||
|
||||
|
||||
def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
|
||||
lsanPath=None, ubsanPath=None, log=None):
|
||||
useLSan=False, log=None):
|
||||
"""
|
||||
populate OS environment variables for mochitest and reftests.
|
||||
|
||||
@ -182,20 +182,12 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
|
||||
else:
|
||||
message = message % 'default memory'
|
||||
|
||||
if lsanPath:
|
||||
if useLSan:
|
||||
log.info("LSan enabled.")
|
||||
asanOptions.append('detect_leaks=1')
|
||||
lsanOptions = ["exitcode=0"]
|
||||
# Uncomment out the next line to report the addresses of leaked objects.
|
||||
# lsanOptions.append("report_objects=1")
|
||||
suppressionsFile = os.path.join(
|
||||
lsanPath, 'lsan_suppressions.txt')
|
||||
if os.path.exists(suppressionsFile):
|
||||
log.info("LSan using suppression file " + suppressionsFile)
|
||||
lsanOptions.append("suppressions=" + suppressionsFile)
|
||||
else:
|
||||
log.info("WARNING | runtests.py | LSan suppressions file"
|
||||
" does not exist! " + suppressionsFile)
|
||||
env["LSAN_OPTIONS"] = ':'.join(lsanOptions)
|
||||
|
||||
if len(asanOptions):
|
||||
@ -224,18 +216,7 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
|
||||
|
||||
ubsan = bool(mozinfo.info.get("ubsan"))
|
||||
if ubsan and (mozinfo.isLinux or mozinfo.isMac):
|
||||
if ubsanPath:
|
||||
log.info("UBSan enabled.")
|
||||
ubsanOptions = []
|
||||
suppressionsFile = os.path.join(
|
||||
ubsanPath, 'ubsan_suppressions.txt')
|
||||
if os.path.exists(suppressionsFile):
|
||||
log.info("UBSan using suppression file " + suppressionsFile)
|
||||
ubsanOptions.append("suppressions=" + suppressionsFile)
|
||||
else:
|
||||
log.info("WARNING | runtests.py | UBSan suppressions file"
|
||||
" does not exist! " + suppressionsFile)
|
||||
env["UBSAN_OPTIONS"] = ':'.join(ubsanOptions)
|
||||
log.info("UBSan enabled.")
|
||||
|
||||
return env
|
||||
|
||||
|
@ -12,10 +12,6 @@ TEST_HARNESS_FILES['web-platform'] += [
|
||||
'wptrunner.ini',
|
||||
]
|
||||
|
||||
TEST_HARNESS_FILES['web-platform'].prefs += [
|
||||
'/build/sanitizers/lsan_suppressions.txt',
|
||||
]
|
||||
|
||||
PYTHON_UNITTEST_MANIFESTS += ['python.ini']
|
||||
|
||||
with Files("**"):
|
||||
|
@ -80,7 +80,6 @@ def browser_kwargs(test_type, run_info_data, config, **kwargs):
|
||||
"ca_certificate_path": config.ssl_config["ca_cert_path"],
|
||||
"e10s": kwargs["gecko_e10s"],
|
||||
"enable_webrender": kwargs["enable_webrender"],
|
||||
"lsan_dir": kwargs["lsan_dir"],
|
||||
"stackfix_dir": kwargs["stackfix_dir"],
|
||||
"binary_args": kwargs["binary_args"],
|
||||
"timeout_multiplier": get_timeout_multiplier(test_type,
|
||||
@ -208,7 +207,7 @@ class FirefoxBrowser(Browser):
|
||||
|
||||
def __init__(self, logger, binary, prefs_root, test_type, extra_prefs=None, debug_info=None,
|
||||
symbols_path=None, stackwalk_binary=None, certutil_binary=None,
|
||||
ca_certificate_path=None, e10s=False, enable_webrender=False, lsan_dir=None, stackfix_dir=None,
|
||||
ca_certificate_path=None, e10s=False, enable_webrender=False, stackfix_dir=None,
|
||||
binary_args=None, timeout_multiplier=None, leak_check=False, asan=False,
|
||||
stylo_threads=1, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, **kwargs):
|
||||
Browser.__init__(self, logger)
|
||||
@ -238,7 +237,6 @@ class FirefoxBrowser(Browser):
|
||||
self.init_timeout = self.init_timeout * timeout_multiplier
|
||||
|
||||
self.asan = asan
|
||||
self.lsan_dir = lsan_dir
|
||||
self.lsan_allowed = None
|
||||
self.lsan_max_stack_depth = None
|
||||
self.mozleak_allowed = None
|
||||
@ -279,8 +277,7 @@ class FirefoxBrowser(Browser):
|
||||
|
||||
env = test_environment(xrePath=os.path.dirname(self.binary),
|
||||
debugger=self.debug_info is not None,
|
||||
log=self.logger,
|
||||
lsanPath=self.lsan_dir)
|
||||
useLSan=True, log=self.logger)
|
||||
|
||||
env["STYLO_THREADS"] = str(self.stylo_threads)
|
||||
if self.chaos_mode_flags is not None:
|
||||
|
@ -262,8 +262,6 @@ scheme host and port.""")
|
||||
help="Disable the WebRender compositor in Gecko.")
|
||||
gecko_group.add_argument("--stackfix-dir", dest="stackfix_dir", action="store",
|
||||
help="Path to directory containing assertion stack fixing scripts")
|
||||
gecko_group.add_argument("--lsan-dir", dest="lsan_dir", action="store",
|
||||
help="Path to directory containing LSAN suppressions file")
|
||||
gecko_group.add_argument("--setpref", dest="extra_prefs", action='append',
|
||||
default=[], metavar="PREF=VALUE",
|
||||
help="Defines an extra user preference (overrides those in prefs_root)")
|
||||
@ -548,9 +546,6 @@ def check_args(kwargs):
|
||||
if kwargs["reftest_internal"] is None:
|
||||
kwargs["reftest_internal"] = True
|
||||
|
||||
if kwargs["lsan_dir"] is None:
|
||||
kwargs["lsan_dir"] = kwargs["prefs_root"]
|
||||
|
||||
if kwargs["reftest_screenshot"] is None:
|
||||
kwargs["reftest_screenshot"] = "unexpected"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user