de5416cb59
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake:ALL_DFSAN_SUPPORTED_ARCH allows AArch64 but currently the instrumentation will crash. Port Linux AArch64 memory mappings from msan but use SizeClassAllocator64 for a slightly more efficient allocator (used by asan/lsan). Change dfsan/lit.cfg.py to allow Linux aarch64. All tests should pass. * dfsan/origin_invalid.c uses x86_64 assembly. Just make it x86_64 specific. * dfsan/interceptors.c our mallinfo interceptor takes an argument instead of returning a struct. This does not work on AArch64 which uses different registers for the two function types. Disable AArch64 as msan/Linux/mallinfo.cpp does. Reviewed By: #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D140770
29 lines
928 B
Python
29 lines
928 B
Python
# -*- Python -*-
|
|
|
|
import os
|
|
|
|
# Setup config name.
|
|
config.name = 'DataFlowSanitizer' + config.name_suffix
|
|
|
|
# Setup source root.
|
|
config.test_source_root = os.path.dirname(__file__)
|
|
|
|
# Setup default compiler flags used with -fsanitize=dataflow option.
|
|
clang_dfsan_cflags = (["-fsanitize=dataflow"] +
|
|
[config.target_cflags])
|
|
|
|
clang_dfsan_cxxflags = config.cxx_mode_flags + clang_dfsan_cflags
|
|
|
|
def build_invocation(compile_flags):
|
|
return " " + " ".join([config.clang] + compile_flags) + " "
|
|
|
|
config.substitutions.append( ("%clang_dfsan ", build_invocation(clang_dfsan_cflags)) )
|
|
config.substitutions.append( ("%clangxx_dfsan ", build_invocation(clang_dfsan_cxxflags)) )
|
|
|
|
# Default test suffixes.
|
|
config.suffixes = ['.c', '.cpp']
|
|
|
|
# DataFlowSanitizer tests are currently supported on Linux only.
|
|
if not (config.host_os in ['Linux'] and config.target_arch in ['aarch64', 'x86_64']):
|
|
config.unsupported = True
|