diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2015-06-15 21:08:47 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-06-15 21:08:47 +0000 |
| commit | b64d0b1e6d5f500201d9d91526bc2bf14cb519d5 (patch) | |
| tree | d367a76befa617c38aa8f940cee7da3c6cf61808 /compiler-rt/test/safestack/lit.cfg | |
| parent | c4122c17b473a6f9f2a5940a98939209aaaa3dfc (diff) | |
| download | bcm5719-llvm-b64d0b1e6d5f500201d9d91526bc2bf14cb519d5.tar.gz bcm5719-llvm-b64d0b1e6d5f500201d9d91526bc2bf14cb519d5.zip | |
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
Diffstat (limited to 'compiler-rt/test/safestack/lit.cfg')
| -rw-r--r-- | compiler-rt/test/safestack/lit.cfg | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler-rt/test/safestack/lit.cfg b/compiler-rt/test/safestack/lit.cfg new file mode 100644 index 00000000000..13fc92fa4b2 --- /dev/null +++ b/compiler-rt/test/safestack/lit.cfg @@ -0,0 +1,24 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = 'SafeStack' + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) + +# Test suffixes. +config.suffixes = ['.c', '.cc', '.cpp', '.m', '.mm', '.ll', '.test'] + +# Add clang substitutions. +config.substitutions.append( ("%clang_nosafestack ", config.clang + " -O0 -fno-sanitize=safe-stack ") ) +config.substitutions.append( ("%clang_safestack ", config.clang + " -O0 -fsanitize=safe-stack ") ) + +if config.lto_supported: + config.available_features.add('lto') + config.substitutions.append((r"%clang_lto_safestack ", ' '.join(config.lto_launch + [config.clang] + config.lto_flags + ['-flto -fsanitize=safe-stack ']))) + +# SafeStack tests are currently supported on Linux, FreeBSD and Darwin only. +if config.host_os not in ['Linux', 'FreeBSD', 'Darwin']: + config.unsupported = True |

