[all-commits] [llvm/llvm-project] 7c2f27: [NewPM][ASan] Make ASan tests work under NPM
aeubanks via All-commits
all-commits at lists.llvm.org
Fri Jul 17 18:01:54 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7c2f2762695896aee5d3c5ebb3943f1a28a5ed3b
https://github.com/llvm/llvm-project/commit/7c2f2762695896aee5d3c5ebb3943f1a28a5ed3b
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2020-07-17 (Fri, 17 Jul 2020)
Changed paths:
M llvm/test/Instrumentation/AddressSanitizer/X86/asm_cpuid.ll
M llvm/test/Instrumentation/AddressSanitizer/X86/asm_more_registers_than_available.ll
M llvm/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll
M llvm/test/Instrumentation/AddressSanitizer/adaptive_global_redzones.ll
M llvm/test/Instrumentation/AddressSanitizer/asan-detect-invalid-pointer-pair.ll
M llvm/test/Instrumentation/AddressSanitizer/asan-masked-load-store.ll
M llvm/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
M llvm/test/Instrumentation/AddressSanitizer/asan_address_space_attr.ll
M llvm/test/Instrumentation/AddressSanitizer/basic-msvc64.ll
M llvm/test/Instrumentation/AddressSanitizer/basic-myriad.ll
M llvm/test/Instrumentation/AddressSanitizer/basic.ll
M llvm/test/Instrumentation/AddressSanitizer/byval-args.ll
M llvm/test/Instrumentation/AddressSanitizer/debug-info-alloca.ll
M llvm/test/Instrumentation/AddressSanitizer/debug-info-global-var.ll
M llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
M llvm/test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll
M llvm/test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca2.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-globals-darwin.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-globals-linux.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-profiling-globals.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-sanitizers.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-touch-odr-global.ll
M llvm/test/Instrumentation/AddressSanitizer/do-not-touch-threadlocal.ll
M llvm/test/Instrumentation/AddressSanitizer/dynamic-shadow-darwin.ll
M llvm/test/Instrumentation/AddressSanitizer/experiment-call.ll
M llvm/test/Instrumentation/AddressSanitizer/experiment.ll
M llvm/test/Instrumentation/AddressSanitizer/force-dynamic-shadow.ll
M llvm/test/Instrumentation/AddressSanitizer/freebsd.ll
M llvm/test/Instrumentation/AddressSanitizer/global_addrspace.ll
M llvm/test/Instrumentation/AddressSanitizer/global_cstring_darwin.ll
M llvm/test/Instrumentation/AddressSanitizer/global_lto_merge.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata_bitcasts.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata_external_comdat.ll
M llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
M llvm/test/Instrumentation/AddressSanitizer/hoist-argument-init-insts.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument-stack.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument_global.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
M llvm/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll
M llvm/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll
M llvm/test/Instrumentation/AddressSanitizer/keep_going.ll
M llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
M llvm/test/Instrumentation/AddressSanitizer/lifetime-uar-uas.ll
M llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
M llvm/test/Instrumentation/AddressSanitizer/local_alias.ll
M llvm/test/Instrumentation/AddressSanitizer/local_stack_base.ll
M llvm/test/Instrumentation/AddressSanitizer/localescape.ll
M llvm/test/Instrumentation/AddressSanitizer/no-globals.ll
M llvm/test/Instrumentation/AddressSanitizer/odr-check-ignore.ll
M llvm/test/Instrumentation/AddressSanitizer/ps4.ll
M llvm/test/Instrumentation/AddressSanitizer/scale-offset.ll
M llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-and-lifetime-be.ll
M llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-and-lifetime.ll
M llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-byval-args.ll
M llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
M llvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
M llvm/test/Instrumentation/AddressSanitizer/stack_layout.ll
M llvm/test/Instrumentation/AddressSanitizer/str-nobuiltin.ll
M llvm/test/Instrumentation/AddressSanitizer/test64.ll
M llvm/test/Instrumentation/AddressSanitizer/twice.ll
M llvm/test/Instrumentation/AddressSanitizer/ubsan.ll
M llvm/test/Instrumentation/AddressSanitizer/win-sorted-sections.ll
M llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
M llvm/test/Instrumentation/AddressSanitizer/with-ifunc.ll
M llvm/tools/opt/NewPMDriver.cpp
Log Message:
-----------
[NewPM][ASan] Make ASan tests work under NPM
Under NPM, the asan-globals-md analysis is required but cannot be run
within the asan function pass due to module analyses not being able to
run from a function pass. So this pins all tests using "-asan" to the
legacy PM and adds a corresponding RUN line with
-passes='require<asan-globals-md>,function(asan)'.
Now all tests in Instrumentation/AddressSanitizer pass when
-enable-new-pm is by default on.
Tests were automatically converted using the following python script and
failures were manually fixed up.
import sys
for i in sys.argv:
with open(i, 'r') as f:
s = f.read()
with open(i, 'w') as f:
for l in s.splitlines():
if "RUN:" in l and ' -asan -asan-module ' in l and '\\' not in l:
f.write(l.replace(' -asan -asan-module ', ' -asan -asan-module -enable-new-pm=0 '))
f.write('\n')
f.write(l.replace(' -asan -asan-module ', " -passes='require<asan-globals-md>,function(asan),module(asan-module)' "))
f.write('\n')
elif "RUN:" in l and ' -asan ' in l and '\\' not in l:
f.write(l.replace(' -asan ', ' -asan -enable-new-pm=0 '))
f.write('\n')
f.write(l.replace(' -asan ', " -passes='require<asan-globals-md>,function(asan)' "))
f.write('\n')
else:
f.write(l)
f.write('\n')
See https://bugs.llvm.org/show_bug.cgi?id=46611.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D83921
More information about the All-commits
mailing list