diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -259,3 +259,12 @@ if config.host_os == 'NetBSD': config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix)) + +# Avoid Windows heuristics which try to detect potential installer programs +# (which may need to run with elevated privileges) and ask if the user wants +# to run them in that way. This heuristic may match for executables containing +# the word "update", e.g. `TestCases/asan_update_allocation.cpp`. Set an +# environment variable indicating that we want to execute them with the current +# user. +if config.host_os == 'Windows': + config.environment['__COMPAT_LAYER'] = 'RunAsInvoker'