summaryrefslogtreecommitdiff
path: root/test/safestack
AgeCommit message (Collapse)Author
2017-10-10Factor out "stable-runtime" feature and enable it on all android.Evgeniy Stepanov
This is a very poorly named feature. I think originally it meant to cover linux only, but the use of it in msan seems to be about any aarch64 platform. Anyway, this change should be NFC on everything except Android. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315389 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-10Enable SafeStack on NetBSDKamil Rytarowski
Summary: make check-safestack: -- Testing: 8 tests, 8 threads -- Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 0.44s Expected Passes : 7 Unsupported Tests : 1 Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, fjricci, filcab Reviewed By: vitalybuka Subscribers: mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36542 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10[Safestack] Fix the canary test to catch the libc's message regarding stack ↵Ivan A. Kosarev
smashing By default glibc writes its diagnostics directly to tty so the `2>&1 |` redirection in the test doesn't catch the *** stack smashing detected *** message, which in turn breaks printing the lit's progress bar. By defining the LIBC_FATAL_STDERR_ environment variable we force glibc to direct diagnostic messages to stderr. Differential Revision: https://reviews.llvm.org/D32599 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302628 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
2016-09-14[asan] Enable -asan-use-private-alias on Darwin/Mach-O, add test for ODR ↵Kuba Brecka
false positive with LTO (compiler-rt part) The '-asan-use-private-alias’ option (disabled by default) option is currently only enabled for Linux and ELF, but it also works on Darwin and Mach-O. This option also fixes a known problem with LTO on Darwin (https://github.com/google/sanitizers/issues/647). This patch enables the support for Darwin (but still keeps it off by default) and adds the LTO test case. Differential Revision: https://reviews.llvm.org/D24292 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281472 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-04-16Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov
At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12[safestack] Fix stack canary test on Mac.Evgeniy Stepanov
Disable FORTIFY_SOURCE and explicitly disable stack protector in the no-stack-protector run. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11[safestack] A test for stackprotector canaries.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-07Ensure safestack overflow test doesn't segfaultDimitry Andric
Summary: In rL255491, the safestack overflow test was disabled for aarch64, since it "is currently failing on an AArch64 buildbot with a segfault, but it is currently passing on other configuration". While testing on FreeBSD on x86, I also encountered a segfault. This is because the `fct()` function actually writes before and after `buffer`, and on FreeBSD this crashes because `buffer` is usually allocated at the end of a page. That this runs correctly on Linux is probably just by accident. I propose to fix this by adding a pre and post buffer, to act as a safety zone. The pre and post buffers must be accessed in an 'unsafe' way, otherwise -fsanitize=safestack will allocate them on the safe stack, and they will not bookend `buffer` itself. Therefore, I create them large enough for `fct()`, and call it on both of them. On FreeBSD, this makes the test run as expected, without segfaulting, and I suppose this will also fix the segfault on AArch64. I do not have AArch64 testing capabilities, so if someone could try that out, I would be much obliged. Reviewers: pcc, kcc, zatrazz Subscribers: llvm-commits, aemerson, emaste Differential Revision: http://reviews.llvm.org/D15725 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257106 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14[compiler-rt] [safestack] Silent overflow.c test on aarch64Adhemerval Zanella
The safestack overflow.c test is currently failing on an aarch64 buildbot with a segfault, but it is currently passing on other configuration. This patch silent the issue for now on aarch64 by setting to all supported architectures the 'stable-runtime' configure and set the test to requires it. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255491 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-16SafeStack: XFAIL the pthread.c test on Darwin.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-15Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239763 91177308-0d34-0410-b5e6-96231b3b80d8