From ea9b82da4180550c3ddc5e883c589474af9462b7 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 30 Jul 2020 20:08:40 +0200 Subject: [PATCH] [libFuzzer] Enable for SystemZ * Add SystemZ to the list of supported architectures. * XFAIL a few tests. Coverage reporting is broken, and is not easy to fix (see comment in coverage.test). Interaction with sanitizers needs to be investigated more thoroughly, since they appear to reduce coverage in certain cases. --- compiler-rt/cmake/config-ix.cmake | 2 +- compiler-rt/test/fuzzer/coverage.test | 2 ++ compiler-rt/test/fuzzer/msan.test | 2 ++ compiler-rt/test/fuzzer/swap-cmp.test | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index 74fef89..5f9e868 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -305,7 +305,7 @@ else() endif() if(OS_NAME MATCHES "Linux") - set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64}) + set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${S390X}) elseif (OS_NAME MATCHES "Windows") set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64}) elseif(OS_NAME MATCHES "Android") diff --git a/compiler-rt/test/fuzzer/coverage.test b/compiler-rt/test/fuzzer/coverage.test index db15c7a..07a10ba 100644 --- a/compiler-rt/test/fuzzer/coverage.test +++ b/compiler-rt/test/fuzzer/coverage.test @@ -1,5 +1,7 @@ # FIXME: Disabled on Windows because -fPIC cannot be used to compile for Windows. UNSUPPORTED: windows +# FIXME: CreatePCArray() emits PLT stub addresses for entry blocks, which are ignored by TracePC::PrintCoverage(). +XFAIL: s390x RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/NullDerefTest.cpp -o %t-NullDerefTest RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC %ld_flags_rpath_so1 -O0 -shared -o %dynamiclib1 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_flags_rpath_so2 -O0 -shared -o %dynamiclib2 diff --git a/compiler-rt/test/fuzzer/msan.test b/compiler-rt/test/fuzzer/msan.test index 2e0339bb..ae1c449 100644 --- a/compiler-rt/test/fuzzer/msan.test +++ b/compiler-rt/test/fuzzer/msan.test @@ -1,3 +1,5 @@ +FIXME: Fails to find BINGO on s390x. +XFAIL: s390x REQUIRES: msan RUN: %msan_compiler %S/SimpleTestStdio.cpp -o %t RUN: not %run %t -seed=1 -runs=10000000 2>&1 | FileCheck %s --check-prefix=NO-REPORT diff --git a/compiler-rt/test/fuzzer/swap-cmp.test b/compiler-rt/test/fuzzer/swap-cmp.test index 7f7e2f6..5c4112c 100644 --- a/compiler-rt/test/fuzzer/swap-cmp.test +++ b/compiler-rt/test/fuzzer/swap-cmp.test @@ -1,3 +1,5 @@ +# FIXME: Fails to find BINGO with ASAN on s390x, work fine without ASAN. +XFAIL: s390x RUN: %cpp_compiler %S/SwapCmpTest.cpp -o %t-SwapCmpTest CHECK: BINGO RUN: not %run %t-SwapCmpTest -seed=1 -runs=10000000 2>&1 | FileCheck %s -- 2.7.4