summaryrefslogtreecommitdiff
path: root/test/cfi/CMakeLists.txt
AgeCommit message (Collapse)Author
2017-10-05[cfi] Disable tests with lld on i386.Evgeniy Stepanov
bin/ld.lld: error: ubsan_handlers.cc:(.debug_info+0x80D5D): has non-ABS reloc Bug pending. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315027 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05[cfi] Test on all available targets.Evgeniy Stepanov
Summary: Run CFI tests on all targets current toolchain can target. On multiarch Linux, this will run all CFI tests with -m32 and -m64. Reviewers: pcc Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38572 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15cfi: Enable ThinLTO tests on Windows.Peter Collingbourne
We now avoid using absolute symbols on Windows (D37407 and D37408), so this should work. Fixes PR32770. Differential Revision: https://reviews.llvm.org/D37883 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313379 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25[cfi] only add cfi tests on supported arches.Sean Fertile
Differential Revision: https://reviews.llvm.org/D35101 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311745 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[cfi] Fix wrong CMake condition for WIN32.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301257 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[cfi] Disable ThinLTO + CFI tests on Windows.Evgeniy Stepanov
PR32770. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22[cfi] Disable thinlto tests on Darwin.Ahmed Bougacha
These were added in r301016, but they're failing, because -fsanitize=cfi seemingly causes -flto=thin to emit raw bitcode objects, rather than the mach-o-wrapped bitcode we emit with -flto=thin alone. That causes all tests to fail with ld64 errors. Filed PR32741. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[cfi] Replace elif with elseif in cmake.Evgeniy Stepanov
Apparently, elif() is deprecated. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301022 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[cfi] Run tests with and without lld and thinlto.Evgeniy Stepanov
Run tests in all configurations: (standalone, with devirtualization) * (gold, lld) * (lto, thinlto) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF.Evgeniy Stepanov
Only depend on LLD if it is going to be built. Re-land of r298174 which got reverted in r298287. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298753 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20Revert r298174, r298173, r298169, r298159.Evgeniy Stepanov
Revert "Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF." Revert "[asan] Remove gc-sections test with bfd." Revert "[asan] Disable globals-gc test with ld.bfd." Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)" OOM in gold linker. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298287 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-18Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF.Evgeniy Stepanov
Only depend on LLD if it is going to be built. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22cfi: Fixes for check-cfi when configured as an external project.Peter Collingbourne
Differential Revision: https://reviews.llvm.org/D24817 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11[compiler-rt] Fix VisualStudio virtual folders layoutEtienne Bergeron
Summary: This patch is a refactoring of the way cmake 'targets' are grouped. It won't affect non-UI cmake-generators. Clang/LLVM are using a structured way to group targets which ease navigation through Visual Studio UI. The Compiler-RT projects differ from the way Clang/LLVM are grouping targets. This patch doesn't contain behavior changes. Reviewers: kubabrecka, rnk Subscribers: wang0109, llvm-commits, kubabrecka, chrisha Differential Revision: http://reviews.llvm.org/D21952 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25cfi: Start testing CFI in both standalone and devirtualization modes.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D21123 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16Introduce stats and stats_client libraries.Peter Collingbourne
This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16176 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257972 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08Fix CMake warning in CFI tests.Evgeniy Stepanov
CFI tests do not require the CFI runtime library on Windows. Do not add "cfi" as a dependency of "check-cfi" in that case. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-15Cross-DSO control flow integrity (compiler-rt part).Evgeniy Stepanov
This is an initial version of the runtime cross-DSO CFI support library. It contains a number of FIXMEs, ex. it does not support the diagnostic mode nor dlopen/dlclose, but it works and can be tested. Diagnostic mode, in particular, would require some refactoring (we'd like to gather all CFI hooks in the UBSan library into one function so that we could easier pass the diagnostic information down to __cfi_check). It will be implemented later. Once the diagnostic mode is in, I plan to create a second test configuration to run all existing tests in both modes. For now, this patch includes only a few new cross-DSO tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255695 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Revert "[CMake] Provide options for toggling on and off various runtime ↵Chris Bieneman
libraries." This reverts r255170. This change caused a bunch of bot failures and needs to be revised. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09[CMake] Provide options for toggling on and off various runtime libraries.Chris Bieneman
Summary: Rather than having to add new "experimental" options each time someone wants to work on bringing a sanitizer to a new platform, this patch makes options for all of them. The default values for the options are set by the platform checks that would have enabled them, but they can be overridden on or off. Reviewers: kubabrecka, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14846 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-11[cmake] Hoist check for LLD sources up into root CMakeLists.txtReid Kleckner
We will use this for ASan on Windows soon. When the ELF port of LLD matures, we can add other sanitizer integration tests to make sure they work with LLD. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244549 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-29CFI: Update tests for various bit vector sizes following lowerbitsets optzns.Peter Collingbourne
Also add a test to ensure that this doesn't regress. Differential Revision: http://reviews.llvm.org/D11584 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-08CFI: Get check-cfi passing on Windows.Peter Collingbourne
Specifically: - Start using %expect_crash. - Provide an implementation of __ubsan::getDynamicTypeInfoFromVtable for the Microsoft C++ ABI. This is all that is needed for CFI diagnostics; UBSan's -fsanitize=vptr also requires an implementation of __ubsan::checkDynamicType. - Build the sanitizer runtimes against the release version of the C runtime, even in debug builds. - Accommodate demangling differences in tests. Differential Revision: http://reviews.llvm.org/D11029 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241745 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19Add control flow integrity diagnosis function to UBSan runtime library.Peter Collingbourne
Also includes execution tests for the feature. Differential Revision: http://reviews.llvm.org/D10269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-16CFI: Make check-cfi depend on libLTO on Darwin.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232426 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25CFI: Add a check-cfi-and-supported rule.Peter Collingbourne
This rule works like check-cfi, but fails if the tests are unsupported. This is useful to run on bots if we want to be sure that the tests aren't silently being skipped. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230536 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20Add test suite for the Control Flow Integrity feature.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D7738 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230056 91177308-0d34-0410-b5e6-96231b3b80d8