summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
* [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 llvm-svn: 239000
* [asan] Fix undefined MAP_NORESERVE on FreeBSD.Evgeniy Stepanov2015-06-041-0/+7
| | | | llvm-svn: 238995
* [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 llvm-svn: 238991
* 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. llvm-svn: 238874
* [ASan] Fixed tests to pass on Darwin. Patch by Maria Guseva!Yury Gribov2015-06-024-4/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D10159 llvm-svn: 238837
* [sanitizer] Add -lrt to dyndd link line.Evgeniy Stepanov2015-05-291-0/+1
| | | | llvm-svn: 238626
* profile: Fix link errors in this test on darwinJustin Bogner2015-05-294-9/+6
| | | | llvm-svn: 238622
* 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. llvm-svn: 238621
* Use sanitizer_atomic_clang.h with clang-cl instead of the MSVC variantReid Kleckner2015-05-291-1/+1
| | | | llvm-svn: 238585
* [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 llvm-svn: 238545
* [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. llvm-svn: 238484
* 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 llvm-svn: 238428
* [ASan] Disable alloca tests on ARM targets due to flakiness.Yury Gribov2015-05-284-8/+4
| | | | llvm-svn: 238426
* [ASan] XFAIL VLA tests on ARM and PowerPC. Patch by Max Ostapenko!Yury Gribov2015-05-284-0/+9
| | | | llvm-svn: 238409
* [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! llvm-svn: 238407
* [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 llvm-svn: 238406
* [ASan] New approach to dynamic allocas unpoisoning. Patch by Max Ostapenko!Yury Gribov2015-05-288-0/+172
| | | | | | Differential Revision: http://reviews.llvm.org/D7098 llvm-svn: 238401
* [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. llvm-svn: 238367
* Test case for PR 23499.Diego Novillo2015-05-272-1/+6
| | | | llvm-svn: 238338
* [msan] Fix mmap test on Fedora.Evgeniy Stepanov2015-05-261-1/+2
| | | | llvm-svn: 238226
* [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. llvm-svn: 238109
* [dfsan] ignore more __sanitizer callbacksKostya Serebryany2015-05-231-5/+3
| | | | llvm-svn: 238085
* 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. llvm-svn: 238056
* [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/. llvm-svn: 237848
* 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. llvm-svn: 237819
* 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. llvm-svn: 237808
* Factor out LTO detection to common configuration.Peter Collingbourne2015-05-192-23/+30
| | | | | | This will allow us to test other sanitizers with LTO. llvm-svn: 237747
* CFI: Remove <utility> include.Peter Collingbourne2015-05-191-1/+0
| | | | | | It is unused, and causes a test failure on Darwin. llvm-svn: 237746
* [ASan/Win] Add DLL thunk for new coverage hookReid Kleckner2015-05-191-0/+1
| | | | | | Should fix dll_host.cc test failing on bots. llvm-svn: 237725
* [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 llvm-svn: 237675
* [asan] Disable static-tls test on PowerPC.Evgeniy Stepanov2015-05-171-0/+2
| | | | llvm-svn: 237534
* [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. llvm-svn: 237495
* [tsan] deflakify one more tsan testKostya Serebryany2015-05-141-0/+4
| | | | llvm-svn: 237387
* [Builtins] Wire half-precision conversions through cc_kext makefiles.Ahmed Bougacha2015-05-141-0/+3
| | | | | | Kernel side of r237329. llvm-svn: 237330
* [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. llvm-svn: 237329
* [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. llvm-svn: 237323
* Include missing 'sanitizer_platform_limits_posix.h'Ismail Pazarbasi2015-05-121-0/+1
| | | | | | Unbreak Mac builds. `#include` seems to be forgotten during staging. llvm-svn: 237190
* 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 llvm-svn: 237177
* Sanitizers: Implement `GetRSS` on Mac OS XIsmail Pazarbasi2015-05-121-3/+12
| | | | | | | | | | Reviewers: kcc, glider, dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9636 llvm-svn: 237173
* [Builtins] Implement half-precision conversions.Ahmed Bougacha2015-05-1211-5/+470
| | | | | | | | | | | | | | | | | Mostly uninteresting, except: - in __extendXfYf2, when checking if the number is normal, the old code relied on the unsignedness of src_rep_t, which is a problem when sizeof(src_rep_t) < sizeof(int): the result gets promoted to int, the signedness of which breaks the comparison. I added an explicit cast; it shouldn't affect other types. - we can't pass __fp16, so src_t and src_rep_t are the same. - the gnu_*_ieee symbols are simply duplicated definitions, as aliases are problematic on mach-o (where only weak aliases are supported; that's not what we want). Differential Revision: http://reviews.llvm.org/D9693 llvm-svn: 237161
* [sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().Sergey Matveev2015-05-121-1/+5
| | | | llvm-svn: 237149
* [sanitizer] Override pipefail in coverage-missing test.Sergey Matveev2015-05-121-8/+2
| | | | | | This should finally fix it. llvm-svn: 237147
* [sanitizer] Re-enable a broken test with debug output.Sergey Matveev2015-05-121-1/+7
| | | | llvm-svn: 237137
* [asan] Disable coverage-missing test failing on the bots.Evgeniy Stepanov2015-05-111-1/+1
| | | | llvm-svn: 237049
* [UBSan] Add missing header that defines SANITIZER_CAN_USE_PREINIT_ARRAYAlexey Samsonov2015-05-111-0/+1
| | | | | | | Otherwise this compile definition was undefined, and .preinit_array was never used on the platforms that support it. llvm-svn: 237045
* [Msan] Fix the if_indextoname.cc test to pass on FreeBSDViktor Kutuzov2015-05-112-2/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D9456 llvm-svn: 236999
* [asan/fuzzer] define a dummy weak __sanitizer_cov_trace_cmpKostya Serebryany2015-05-081-0/+3
| | | | llvm-svn: 236907
* [sanitizer] Attempt to fix the test for missing coverage script.Sergey Matveev2015-05-081-6/+7
| | | | llvm-svn: 236877
* [TSan][MIPS] XFAIL long jump tests for MIPS64Sagar Thakur2015-05-085-0/+19
| | | | | | | | | | Mark longjmp tests as XFAIL because longjmp assembly for mips is not yet implemented. Reviewers: dsanders, dvyukov, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9526 llvm-svn: 236847
* [ASAN] Use regex for addresses in kernel_area.cc testSagar Thakur2015-05-081-6/+6
| | | | | | | | | | | This test was failing on mips because mips addresses are 40-bit long. Using regex for address solves this issue. Reviewers: dsanders, kcc, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9516 llvm-svn: 236844
OpenPOWER on IntegriCloud