[compiler-rt] ea9b82d - [libFuzzer] Enable for SystemZ

Ilya Leoshkevich via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 12:53:40 PDT 2020


Author: Ilya Leoshkevich
Date: 2020-08-04T21:53:27+02:00
New Revision: ea9b82da4180550c3ddc5e883c589474af9462b7

URL: https://github.com/llvm/llvm-project/commit/ea9b82da4180550c3ddc5e883c589474af9462b7
DIFF: https://github.com/llvm/llvm-project/commit/ea9b82da4180550c3ddc5e883c589474af9462b7.diff

LOG: [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.

Added: 
    

Modified: 
    compiler-rt/cmake/config-ix.cmake
    compiler-rt/test/fuzzer/coverage.test
    compiler-rt/test/fuzzer/msan.test
    compiler-rt/test/fuzzer/swap-cmp.test

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 74fef8933ef9..5f9e868de5fd 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 db15c7a66c6d..07a10ba169f0 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 2e0339bb8ff7..ae1c44987865 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 7f7e2f60fa63..5c4112c35675 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


        


More information about the llvm-commits mailing list