[test] Fix sanitizer options for OOM and leak detection

Bug: chromium:726584
Change-Id: I49daa3e7de4f792db9908885ab94a87661950a4e
Reviewed-on: https://chromium-review.googlesource.com/732654
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49186}
This commit is contained in:
Michael Achenbach 2017-11-07 13:27:22 +01:00 committed by Commit Bot
parent 2e51265f29
commit 67d543ec31
2 changed files with 10 additions and 1 deletions

View File

@ -374,6 +374,9 @@
# Flaky on ASAN builds: https://bugs.chromium.org/p/v8/issues/detail?id=6305
'regress/regress-430201': [SKIP],
'regress/regress-430201b': [SKIP],
# Stack overflow on windows.
'es8/regress/regress-624300': [PASS, ['system == windows', SKIP]],
}], # 'asan == True'
##############################################################################

View File

@ -336,10 +336,16 @@ class BaseTestRunner(object):
symbolizer_option = self._get_external_symbolizer_option()
if self.build_config.asan:
asan_options = [symbolizer_option, "allow_user_segv_handler=1"]
asan_options = [
symbolizer_option,
'allow_user_segv_handler=1',
'allocator_may_return_null=1',
]
if not utils.GuessOS() in ['macos', 'windows']:
# LSAN is not available on mac and windows.
asan_options.append('detect_leaks=1')
else:
asan_options.append('detect_leaks=0')
os.environ['ASAN_OPTIONS'] = ":".join(asan_options)
if self.build_config.cfi_vptr: