[PATCH] D83921: [NewPM][ASan] Make ASan tests work under NPM
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 18:03:17 PDT 2020
aeubanks created this revision.
aeubanks added a reviewer: vitalybuka.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya, emaste.
Herald added a project: LLVM.
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')
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83921
Files:
llvm/test/Instrumentation/AddressSanitizer/X86/asm_cpuid.ll
llvm/test/Instrumentation/AddressSanitizer/X86/asm_more_registers_than_available.ll
llvm/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll
llvm/test/Instrumentation/AddressSanitizer/adaptive_global_redzones.ll
llvm/test/Instrumentation/AddressSanitizer/asan-detect-invalid-pointer-pair.ll
llvm/test/Instrumentation/AddressSanitizer/asan-masked-load-store.ll
llvm/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
llvm/test/Instrumentation/AddressSanitizer/asan_address_space_attr.ll
llvm/test/Instrumentation/AddressSanitizer/basic-msvc64.ll
llvm/test/Instrumentation/AddressSanitizer/basic-myriad.ll
llvm/test/Instrumentation/AddressSanitizer/basic.ll
llvm/test/Instrumentation/AddressSanitizer/byval-args.ll
llvm/test/Instrumentation/AddressSanitizer/debug-info-alloca.ll
llvm/test/Instrumentation/AddressSanitizer/debug-info-global-var.ll
llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
llvm/test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca.ll
llvm/test/Instrumentation/AddressSanitizer/debug_info_noninstrumented_alloca2.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-globals-darwin.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-globals-linux.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-profiling-globals.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-promotable-allocas.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-sanitizers.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-touch-odr-global.ll
llvm/test/Instrumentation/AddressSanitizer/do-not-touch-threadlocal.ll
llvm/test/Instrumentation/AddressSanitizer/dynamic-shadow-darwin.ll
llvm/test/Instrumentation/AddressSanitizer/experiment-call.ll
llvm/test/Instrumentation/AddressSanitizer/experiment.ll
llvm/test/Instrumentation/AddressSanitizer/force-dynamic-shadow.ll
llvm/test/Instrumentation/AddressSanitizer/freebsd.ll
llvm/test/Instrumentation/AddressSanitizer/global_addrspace.ll
llvm/test/Instrumentation/AddressSanitizer/global_cstring_darwin.ll
llvm/test/Instrumentation/AddressSanitizer/global_lto_merge.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_bitcasts.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_external_comdat.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
llvm/test/Instrumentation/AddressSanitizer/hoist-argument-init-insts.ll
llvm/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll
llvm/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
llvm/test/Instrumentation/AddressSanitizer/instrument-stack.ll
llvm/test/Instrumentation/AddressSanitizer/instrument_global.ll
llvm/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
llvm/test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll
llvm/test/Instrumentation/AddressSanitizer/instrumentation-with-call-threshold.ll
llvm/test/Instrumentation/AddressSanitizer/keep_going.ll
llvm/test/Instrumentation/AddressSanitizer/lifetime-throw.ll
llvm/test/Instrumentation/AddressSanitizer/lifetime-uar-uas.ll
llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
llvm/test/Instrumentation/AddressSanitizer/local_alias.ll
llvm/test/Instrumentation/AddressSanitizer/local_stack_base.ll
llvm/test/Instrumentation/AddressSanitizer/localescape.ll
llvm/test/Instrumentation/AddressSanitizer/no-globals.ll
llvm/test/Instrumentation/AddressSanitizer/odr-check-ignore.ll
llvm/test/Instrumentation/AddressSanitizer/ps4.ll
llvm/test/Instrumentation/AddressSanitizer/scale-offset.ll
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-and-lifetime-be.ll
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-and-lifetime.ll
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning-byval-args.ll
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
llvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
llvm/test/Instrumentation/AddressSanitizer/stack_layout.ll
llvm/test/Instrumentation/AddressSanitizer/str-nobuiltin.ll
llvm/test/Instrumentation/AddressSanitizer/test64.ll
llvm/test/Instrumentation/AddressSanitizer/twice.ll
llvm/test/Instrumentation/AddressSanitizer/ubsan.ll
llvm/test/Instrumentation/AddressSanitizer/win-sorted-sections.ll
llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
llvm/test/Instrumentation/AddressSanitizer/with-ifunc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83921.278345.patch
Type: text/x-patch
Size: 82575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/9f7f7418/attachment.bin>
More information about the llvm-commits
mailing list