summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASan] Quick-fix tests for new string interceptors.Yury Gribov2015-06-108-17/+17
| | | | | | | | | Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D10336 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239461 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fixup to r239134. This test does pass on darwin.Anna Zaks2015-06-081-1/+1
| | | | | | This should restore the darwin buildbot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239364 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Disable asan for aarch64.Evgeniy Stepanov2015-06-081-1/+1
| | | | | | | lib/Target/AArch64/AArch64FrameLowering.cpp:370: virtual void llvm::AArch64FrameLowering::emitPrologue(llvm::MachineFunction&, llvm::MachineBasicBlock&) const: Assertion `!(NeedsRealignment && NumBytes==0) && "NumBytes should never be 0 when realignment is needed"' failed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239352 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Enable AArch64 build of ASan runtime and tests.Evgeniy Stepanov2015-06-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239322 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix Android build for API >= 21.Evgeniy Stepanov2015-06-081-1/+1
| | | | | | | | | | | | | | /code/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:971:8: error: address of function 'dl_iterate_phdr' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (!dl_iterate_phdr) ~^~~~~~~~~~~~~~~ /code/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:971:8: note: prefix with the address-of operator to silence this warning if (!dl_iterate_phdr) ^ & git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239321 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix build of AsanNoinstTest on Android.Evgeniy Stepanov2015-06-081-0/+2
| | | | | | | Some of the asan-ubsan build changes were not replicated in the android branch in CMakeLists. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239320 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Bump maximum allowed malloc() size in ASan allocator to 1Tb.Alexey Samsonov2015-06-051-2/+2
| | | | | | 1Tb of RAM ought to be enough for anybody. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239187 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Add process basename to log name and error message toYury Gribov2015-06-054-13/+50
| | | | | | | | | simplify analysis of sanitized systems logs. Differential Revision: http://reviews.llvm.org/D7333 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239134 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] Disable a flaky test.Evgeniy Stepanov2015-06-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239063 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fix Darwin and Windows builds.Yury Gribov2015-06-042-12/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239027 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Make binary name reader cross-platform.Yury Gribov2015-06-0411-35/+51
| | | | | | | Differential Revision: http://reviews.llvm.org/D10213 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239020 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Move ASan runtime library self-checks to a more appropriate place.Yury Gribov2015-06-042-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239018 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer_common] Added VS-style output for source locationsFilipe Cabecinhas2015-06-048-26/+75
| | | | | | | | | | | | | | | | | | | | | Summary: With this patch, we have a flag to toggle displaying source locations in the regular style: file:line:column or Visual Studio style: file(line,column) This way, they get picked up on the Visual Studio output window and one can double-click them to get to that file location. Reviewers: samsonov, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10113 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239000 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix undefined MAP_NORESERVE on FreeBSD.Evgeniy Stepanov2015-06-041-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238995 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] Add *SAN_OPTIONS to possibly_dangerous_env_varsFilipe Cabecinhas2015-06-041-1/+3
| | | | | | | | | | | | | | Summary: This way, if they're set when running ninja check-ubsan (or another sanitizer), they get cleared before we start invoking the programs. Reviewers: samsonov, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10229 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238991 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests: disable test of /proc filesystem on Darwin.Tim Northover2015-06-021-1/+1
| | | | | | | | We don't have it. I'm not entirely sure "Posix" is a good name for that directory, but perhaps we should see how it develops. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238874 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!Yury Gribov2015-06-024-4/+8
| | | | | | | Differential Revision: http://reviews.llvm.org/D10159 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238837 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Add -lrt to dyndd link line.Evgeniy Stepanov2015-05-291-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238626 91177308-0d34-0410-b5e6-96231b3b80d8
* profile: Fix link errors in this test on darwinJustin Bogner2015-05-294-9/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238622 91177308-0d34-0410-b5e6-96231b3b80d8
* Add descriptive names to sanitizer entries in /proc/self/maps. Helps debugging.Evgeniy Stepanov2015-05-2920-54/+166
| | | | | | | | | | | | | | | | | | | This is done by creating a named shared memory region, unlinking it and setting up a private (i.e. copy-on-write) mapping of that instead of a regular anonymous mapping. I've experimented with regular (sparse) files, but they can not be scaled to the size of MSan shadow mapping, at least on Linux/X86_64 and ext3 fs. Controlled by a common flag, decorate_proc_maps, disabled by default. This patch has a few shortcomings: * not all mappings are annotated, especially in TSan. * our handling of memset() of shadow via mmap() puts small anonymous mappings inside larger named mappings, which looks ugly and can, in theory, hit the mapping number limit. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238621 91177308-0d34-0410-b5e6-96231b3b80d8
* Use sanitizer_atomic_clang.h with clang-cl instead of the MSVC variantReid Kleckner2015-05-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238585 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fix flaky tests (see https://llvm.org/bugs/show_bug.cgi?id=23230).Yury Gribov2015-05-292-12/+22
| | | | | | | | | Patch by Maria Guseva! Differential Revision: http://reviews.llvm.org/D10063 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238545 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Add new(unsigned int) to ASan interface list.Evgeniy Stepanov2015-05-281-5/+12
| | | | | | | | | | Also, sized-delete with size_t == unsigned int. These guys appear when building for Android with gnu-stl. Fixes a number of ASan tests in that particular configuration. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238484 91177308-0d34-0410-b5e6-96231b3b80d8
* Use /usr/bin/env to find pythonEd Maste2015-05-282-2/+2
| | | | | | | | | | | Python may not be /usr/bin/python on some systems. For example, on FreeBSD it will be /usr/local/bin/python. Reviewers: samsonov Differential Revision: http://reviews.llvm.org/D9914 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238428 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Disable alloca tests on ARM targets due to flakiness.Yury Gribov2015-05-284-8/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238426 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] XFAIL VLA tests on ARM and PowerPC. Patch by Max Ostapenko!Yury Gribov2015-05-284-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238409 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Add new interceptors to asan_win_dll_thunk.cc to fix build errors on ↵Yury Gribov2015-05-281-0/+4
| | | | | | | | | Windows. Patch by Maria Guseva! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238407 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, ↵Yury Gribov2015-05-2824-11/+503
| | | | | | | | | | | strpbrk. Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D9017 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238406 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] New approach to dynamic allocas unpoisoning. Patch by Max Ostapenko!Yury Gribov2015-05-288-0/+172
| | | | | | | Differential Revision: http://reviews.llvm.org/D7098 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238401 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix build dependency issues with ASan version list file.Evgeniy Stepanov2015-05-271-2/+15
| | | | | | | | | | | CMake pre-3.1 has a bug where a shared library depending on a custom_target does not really depend on it. This commit implements a hilariously ugly workaround for this problem, see code comments for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238367 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for PR 23499.Diego Novillo2015-05-272-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238338 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Fix mmap test on Fedora.Evgeniy Stepanov2015-05-261-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238226 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Mprotect all inaccessible memory regions.Evgeniy Stepanov2015-05-244-12/+75
| | | | | | | | | | | | | | | | | | Fix 2 bugs in memory mapping setup: - the invalid region at offset 0 was not protected because mmap at address 0 fails with EPERM on most Linux systems. We did not notice this because the check condition was flipped: the code was checking that mprotect has failed. And the test that was supposed to catch this was weakened by the mitigations in the mmap interceptor. - when running without origins, the origin shadow range was left unprotected. The new test ensures that mmap w/o MAP_FIXED always returns valid application addresses. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238109 91177308-0d34-0410-b5e6-96231b3b80d8
* [dfsan] ignore more __sanitizer callbacksKostya Serebryany2015-05-231-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238085 91177308-0d34-0410-b5e6-96231b3b80d8
* builtins: mark functions as aapcs on WindowsSaleem Abdulrasool2015-05-221-1/+5
| | | | | | | | Windows does not use AAPCS, but rather AAPCS-VFP, and thus the functions which are assumed to be AAPCS will cause invalid argument setup. Ensure that the functions are marked as AAPCS. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238056 91177308-0d34-0410-b5e6-96231b3b80d8
* [darwin] fix libcompiler_rt.dylib buildNick Kledzik2015-05-201-1/+1
| | | | | | | | | The dylib build of compiler-rt has been broken on darwin since the directory restructuring to push some things down into /builtins/. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237848 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert some of "Silence some CMake 3.3 dev warnings in compiler-rt"Reid Kleckner2015-05-201-6/+0
| | | | | | | | | This reverts part of r237808. The CMP0057 warnings came from an old development build of CMake that nobody else has. We don't need the cruft. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237819 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence some CMake 3.3 dev warnings in compiler-rtReid Kleckner2015-05-202-1/+7
| | | | | | | | | | | Fix a trivial instance of CMP0054 that came up on llvmdev. The other warnings were CMP0057, which is about using the same file as a MAIN_DEPENDENCY multiple times. The old behavior hasn't been a problem yet, so I silenced the warning and filed PR23595 to document the issue if someone cares. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237808 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out LTO detection to common configuration.Peter Collingbourne2015-05-192-23/+30
| | | | | | This will allow us to test other sanitizers with LTO. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237747 91177308-0d34-0410-b5e6-96231b3b80d8
* CFI: Remove <utility> include.Peter Collingbourne2015-05-191-1/+0
| | | | | | It is unused, and causes a test failure on Darwin. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237746 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Add DLL thunk for new coverage hookReid Kleckner2015-05-191-0/+1
| | | | | | Should fix dll_host.cc test failing on bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237725 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer][MIPS] Add --target flag for MIPS32Sagar Thakur2015-05-194-4/+8
| | | | | | | | | | Without the --target flag, clang uses the mips64 triple which selects the n64 abi. We need to add --target=mips-linux-gnu, so that clang can select the correct abi for mips32r2. Reviewers: dsanders, kcc, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9249 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237675 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Disable static-tls test on PowerPC.Evgeniy Stepanov2015-05-171-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237534 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Recognize static TLS in __tls_get_addr interceptor.Evgeniy Stepanov2015-05-167-3/+66
| | | | | | | | | Current code tries to find the dynamic TLS header to the left of the TLS block without checking that it's not a static TLS allocation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237495 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] deflakify one more tsan testKostya Serebryany2015-05-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237387 91177308-0d34-0410-b5e6-96231b3b80d8
* [Builtins] Wire half-precision conversions through cc_kext makefiles.Ahmed Bougacha2015-05-141-0/+3
| | | | | | | Kernel side of r237329. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237330 91177308-0d34-0410-b5e6-96231b3b80d8
* [Builtins] Wire half-precision conversions through Darwin makefiles.Ahmed Bougacha2015-05-143-3/+12
| | | | | | | | | | Follow-up to r237161, modeled after r236805. Note that arm64 is omitted on purpose, as the conversions are supported natively there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237329 91177308-0d34-0410-b5e6-96231b3b80d8
* [Builtins] Implement f2h/h2f by jumping to trunc/extend.Ahmed Bougacha2015-05-142-4/+8
| | | | | | | | | | | | | Follow-up to r237161; seems like we can't use aliases, but we can do better than duplicating the bodies, especially when that body, after inlining, isn't as small as it looks. Better approaches welcome. Perhaps the best thing is just to have an #ifndef __APPLE__ over the GNUEABI names, since they're not used there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237323 91177308-0d34-0410-b5e6-96231b3b80d8
* Include missing 'sanitizer_platform_limits_posix.h'Ismail Pazarbasi2015-05-121-0/+1
| | | | | | Unbreak Mac builds. `#include` seems to be forgotten during staging. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237190 91177308-0d34-0410-b5e6-96231b3b80d8
* Call system's sigfillset and sigprocmask functions from sanitizersIsmail Pazarbasi2015-05-121-0/+7
| | | | | | | | | | Reviewers: kcc, glider, dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9637 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237177 91177308-0d34-0410-b5e6-96231b3b80d8