Commit Graph

28 Commits

Author SHA1 Message Date
Peter Collingbourne b64d0b1e6d Protection against stack-based memory corruption errors using SafeStack: compiler-rt runtime support library
This patch adds runtime support for the Safe Stack protection to compiler-rt
(see http://reviews.llvm.org/D6094 for the detailed description of the
Safe Stack).

This patch is our implementation of the safe stack on top of compiler-rt. The
patch adds basic runtime support for the safe stack to compiler-rt that
manages unsafe stack allocation/deallocation for each thread.

Original patch by Volodymyr Kuznetsov and others at the Dependable Systems
Lab at EPFL; updates and upstreaming by myself.

Differential Revision: http://reviews.llvm.org/D6096

llvm-svn: 239763
2015-06-15 21:08:47 +00:00
Peter Collingbourne e0c4f7eb81 Add test suite for the Control Flow Integrity feature.
Differential Revision: http://reviews.llvm.org/D7738

llvm-svn: 230056
2015-02-20 20:31:18 +00:00
Filipe Cabecinhas a1225be1ea Make FileCheck be a common dependency, not an ASan one.
Summary:
It still gets picked up by ASan, but it also gets picked up by the other
test suites.

Otherwise, some test suites (e.g: UBSan) would complain they had no
dependencies, and wouldn't run.

Reviewers: samsonov, eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7740

llvm-svn: 229962
2015-02-20 03:41:07 +00:00
Reid Kleckner 04748b98a6 Don't make check-sanitizer depend on profile on Windows
We don't build the profiling library on Windows, so CMake warns that the
target doesn't exist.

llvm-svn: 222588
2014-11-21 23:09:51 +00:00
Kostya Serebryany fd5e21adba [asan] make sanitizer tests depend on libclang_rt.profile since we now have a test that uses -coverage
llvm-svn: 218427
2014-09-24 23:54:04 +00:00
Alexey Samsonov 68b9e74592 [CMake] Determine which compiler-rt libraries are supported on
a given platform in a top-level CMakeLists.txt to use it both
in lib/ and in test/ subdirectories. Move architecture/platform
checks to config-ix.

llvm-svn: 215247
2014-08-08 22:01:20 +00:00
Duncan P. N. Exon Smith ae2f0bbcf1 InstrProf: Add simple compiler-rt test
Add the test infrastructure for testing lib/profile and a single test.
This initial commit only enables the tests on Darwin, but they'll be
enabled on Linux soon after.

<rdar://problem/16458307>

llvm-svn: 205256
2014-03-31 22:45:37 +00:00
Alexey Samsonov 04e7ad29ea [CMake] Introduce check-all command for standalone compiler-rt build
llvm-svn: 201780
2014-02-20 12:36:26 +00:00
Alexey Samsonov 35a66d15d4 Move config for sanitizer_common tests under test/ for consistency
llvm-svn: 201779
2014-02-20 12:18:08 +00:00
Alexey Samsonov aa980c760b [CMake] Add the way to run tests in standalone build.
1) Depend on llvm-config (configured in LLVM_CONFIG_PATH) to
get necessary LLVM source/binary directories.
2) Add basic support for running lit tests (check-xsan commands).
For now this "support" is far from what we want:
  * unit tests are not built currently.
  * lit tests use Clang/compiler-rt from LLVM build directory,
    not the host compiler or just-built compiler-rt libraries.

We should make a choice on the way we intend ti run compiler-rt lit testsuite:
a) use either Clang from LLVM build tree, or the host compiler.
b) use either just-built runtimes, or the runtimes shipped with the
host compiler.

Using just-built runtimes is tricky - we have to know where to put them, so that
Clang/GCC driver would pick them up (and not overwrite the existing runtimes).
Using a host compiler instead of Clang from LLVM build tree will give us a chance to
run lit tests under GCC (which already has support for several sanitizers).

That is, I tend to make the following choice: if we're in a standalone compiler-rt
build, use host compiler with its set of runtime libraries to run lit tests.
This will effectively decouple "make compiler-rt" and "make check-compiler-rt" in
a standalone build - the latter wouldn't invoke the former. Note that if we decide
to fix LLVM/Clang/compiler-rt build system so that it would configure/build
compiler-rt with just-built Clang (as we do in Makefile-based build), this will not
be a problem - we can add a dependency to ensure that clang/compiler-rt are rebuilt
before running compiler-rt tests.

llvm-svn: 201656
2014-02-19 10:04:29 +00:00
Alexey Samsonov b73db72a17 [CMake] Simplify setting compile flag disabling RTTI
llvm-svn: 201547
2014-02-18 07:52:40 +00:00
Alexey Samsonov 9a70077b47 [ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.
llvm-svn: 201417
2014-02-14 14:45:13 +00:00
Alexey Samsonov e6a6183e9b Move TSan lit-tests under test/tsan
llvm-svn: 201414
2014-02-14 14:35:48 +00:00
Alexey Samsonov 9f20d67034 Move ASan lit-tests under test/asan
llvm-svn: 201413
2014-02-14 14:06:10 +00:00
Alexey Samsonov 8434e60f7e Move MSan lit-tests under test/msan
llvm-svn: 201412
2014-02-14 13:02:58 +00:00
Alexey Samsonov 7eeef85bd4 Move LSan test suite under test/
llvm-svn: 201408
2014-02-14 12:26:05 +00:00
Alexey Samsonov f6cf6ab53b Move DFSan test suite under test/
llvm-svn: 201403
2014-02-14 12:05:41 +00:00
Alexey Samsonov ba869e79a0 Move UBSan test suite under test/
llvm-svn: 201401
2014-02-14 11:42:22 +00:00
Alexey Samsonov 81a2b466e9 Move shared configs for lit test suites to test/ and unittests/ directories
llvm-svn: 201399
2014-02-14 11:00:07 +00:00
Chandler Carruth 6acfaaf3aa Remove the old, and non-functional CMake build system from CompilerRT.
I cannot build any part of this successfully on either Linux or Darwin,
and the replacement is worlds simpler by requiring that this be built as
a subproject of LLVM. If this breaks you for any reason, please let me
know, and let me know what your use case is.

llvm-svn: 154059
2012-04-04 22:12:01 +00:00
Edward O'Callaghan 7c1cc70a90 Fix test suit for last CMake changes to CompilerRT.
llvm-svn: 85452
2009-10-29 00:16:23 +00:00
Edward O'Callaghan 6d0a86cbd1 Update web docs for cmake test suit, comment out broken test.
llvm-svn: 85350
2009-10-28 00:09:30 +00:00
Edward O'Callaghan 1bafa6de57 Fix cmake test suit for compiler-rt.
llvm-svn: 85339
2009-10-27 23:23:41 +00:00
Edward O'Callaghan c0c9968f1b Comment out broken tests and make the rest build in cmake build system.
llvm-svn: 84330
2009-10-17 10:19:32 +00:00
Edward O'Callaghan 882b798a50 Generalize Blocks code and intergrate with cmake build system more.
llvm-svn: 81613
2009-09-12 15:47:39 +00:00
Edward O'Callaghan ccf48131d0 Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 compliant. Comment trailing endifs
llvm-svn: 78537
2009-08-09 18:41:02 +00:00
Edward O'Callaghan df72046277 Start porting compiler-rt testsuit to Solaris with new build system. Fix some C++ style comments which are not allowed in ISO C90.
llvm-svn: 78143
2009-08-05 01:47:29 +00:00
Edward O'Callaghan 6912ed0f36 Initial import of CMake type build system. Just like the rest of llvm..
llvm-svn: 77933
2009-08-03 01:08:25 +00:00