| Index: testing/test_env.py
|
| diff --git a/testing/test_env.py b/testing/test_env.py
|
| index 66a3721beccb78c05d6299b6671a9ae2faf607a8..d19f74feee99b5f27c6d7e7ec9ca1a2133f1c554 100755
|
| --- a/testing/test_env.py
|
| +++ b/testing/test_env.py
|
| @@ -73,20 +73,23 @@ 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:
|
| - # ASan uses a script for offline symbolization.
|
| + elif (asan or msan) 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.
|
| symbolization_options = ['symbolize=0']
|
| # Set the path to llvm-symbolizer to be used by asan_symbolize.py
|
| extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path
|
| + else:
|
| + symbolization_options = []
|
|
|
| if asan:
|
| asan_options = symbolization_options[:]
|
| if lsan:
|
| asan_options.append('detect_leaks=1')
|
|
|
| - extra_env['ASAN_OPTIONS'] = ' '.join(asan_options)
|
| + if asan_options:
|
| + extra_env['ASAN_OPTIONS'] = ' '.join(asan_options)
|
|
|
| if sys.platform == 'darwin':
|
| isolate_output_dir = os.path.abspath(os.path.dirname(cmd[0]))
|
| @@ -183,7 +186,13 @@ def run_executable(cmd, env):
|
| lsan = '--lsan=1' in cmd
|
| msan = '--msan=1' in cmd
|
| tsan = '--tsan=1' in cmd
|
| - use_symbolization_script = (asan or msan) and not lsan
|
| + 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
|
|
|
| if asan or lsan or msan or tsan:
|
| extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan))
|
|
|