diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-18 14:34:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-04 11:15:27 +0000 |
commit | e6430e577f105ad8813c92e75c54660c4985026e (patch) | |
tree | 88115e5d1fb471fea807111924dcccbeadbf9e4f /chromium/testing/test_env.py | |
parent | 53d399fe6415a96ea6986ec0d402a9c07da72453 (diff) | |
download | qtwebengine-chromium-e6430e577f105ad8813c92e75c54660c4985026e.tar.gz |
BASELINE: Update Chromium to 61.0.3163.99
Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/testing/test_env.py')
-rwxr-xr-x | chromium/testing/test_env.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chromium/testing/test_env.py b/chromium/testing/test_env.py index 2e446e7e521..284185d5637 100755 --- a/chromium/testing/test_env.py +++ b/chromium/testing/test_env.py @@ -52,7 +52,7 @@ def fix_python_path(cmd): return out -def get_sanitizer_env(cmd, asan, lsan, msan, tsan): +def get_sanitizer_env(cmd, asan, lsan, msan, tsan, cfi_diag): """Returns the envirnoment flags needed for sanitizer tools.""" extra_env = {} @@ -73,7 +73,7 @@ def get_sanitizer_env(cmd, asan, lsan, msan, tsan): # fact, it needs symbolization to be able to apply suppressions. symbolization_options = ['symbolize=1', 'external_symbolizer_path=%s' % symbolizer_path] - elif (asan or msan) and sys.platform not in ['win32', 'cygwin']: + elif (asan or msan or cfi_diag) and sys.platform not in ['win32', 'cygwin']: # ASan uses a script for offline symbolization, except on Windows. # Important note: when running ASan with leak detection enabled, we must use # the LSan symbolization options above. @@ -120,6 +120,11 @@ def get_sanitizer_env(cmd, asan, lsan, msan, tsan): tsan_options = symbolization_options[:] extra_env['TSAN_OPTIONS'] = ' '.join(tsan_options) + # CFI uses the UBSan runtime to provide diagnostics. + if cfi_diag: + ubsan_options = symbolization_options[:] + ['print_stacktrace=1'] + extra_env['UBSAN_OPTIONS'] = ' '.join(ubsan_options) + return extra_env @@ -185,16 +190,17 @@ def run_executable(cmd, env): lsan = '--lsan=1' in cmd msan = '--msan=1' in cmd tsan = '--tsan=1' in cmd + cfi_diag = '--cfi-diag=1' in cmd if sys.platform in ['win32', 'cygwin']: # Symbolization works in-process on Windows even when sandboxed. use_symbolization_script = False else: # LSan doesn't support sandboxing yet, so we use the in-process symbolizer. # Note that ASan and MSan can work together with LSan. - use_symbolization_script = (asan or msan) and not lsan + use_symbolization_script = (asan or msan or cfi_diag) and not lsan - if asan or lsan or msan or tsan: - extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan)) + if asan or lsan or msan or tsan or cfi_diag: + extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan, cfi_diag)) if lsan or tsan: # LSan and TSan are not sandbox-friendly. |