summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merging r231402:release_36Joerg Sonnenberger2015-03-121-8/+8
| | | | | | | | Move use of __builtin_longjmp under the same conditions as the only caller of the function. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_36@231993 91177308-0d34-0410-b5e6-96231b3b80d8
* Merging r226809:Hans Wennborg2015-02-031-6/+8
| | | | | | | | | | | ------------------------------------------------------------------------ r226809 | timurrrr | 2015-01-22 04:24:21 -0800 (Thu, 22 Jan 2015) | 1 line [ASan/Win] Move the shadow to 0x30000000 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_36@228007 91177308-0d34-0410-b5e6-96231b3b80d8
* builtins: avoid duplicating unwind declarationsSaleem Abdulrasool2015-01-142-44/+9
| | | | | | | | | Use unwind.h to get the declarations for unwinding interfaces. This header is already provided by clang and gcc, so this adds no additional dependencies for building the builtins library. It avoids the duplication which may drift over time though. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225990 91177308-0d34-0410-b5e6-96231b3b80d8
* [Msan] Fix strlen() and strnlen() interceptors to work on FreeBSDViktor Kutuzov2015-01-141-0/+4
| | | | | | | Differential Revision: http://reviews.llvm.org/D6928 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225986 91177308-0d34-0410-b5e6-96231b3b80d8
* [dfsan] Export dfsan_get_label_info function with C linkage.Peter Collingbourne2015-01-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225692 91177308-0d34-0410-b5e6-96231b3b80d8
* [Msan] Fix use of mmap(MAP_ANONYMOUS) in the unit tests on FreeBSDViktor Kutuzov2015-01-121-2/+3
| | | | | | | Differential Revision: http://reviews.llvm.org/D6929 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225688 91177308-0d34-0410-b5e6-96231b3b80d8
* [Msan] Fix tests reading /proc files on FreeBSDViktor Kutuzov2015-01-121-7/+13
| | | | | | | Differential Revision: http://reviews.llvm.org/D6926 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225686 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Move the shadow on Windows 32-bit from 0x20000000 to 0x40000000Timur Iskhodzhanov2015-01-121-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225641 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix uninit in coverage.Evgeniy Stepanov2015-01-121-6/+30
| | | | | | | | pc_fd was not initialized to (-1) on some code paths, resulting in the program erroneously closing stdin when reinitializing coverage. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225637 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two extra semicolon warningsEhsan Akhgari2015-01-122-2/+3
| | | | | | | | | | Reviewers: timurrrr Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6890 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225635 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Handle SIGBUS on Linux.Jay Foad2015-01-121-1/+1
| | | | | | | | | | | | | | | | | | Summary: On Linux in some situations we can get SIGBUS instead of SIGSEGV on stack overflow, so asan should handle SIGBUS as well as SIGSEGV. https://code.google.com/p/address-sanitizer/issues/detail?id=369 Reviewers: samsonov, glider Reviewed By: glider Subscribers: glider, llvm-commits Differential Revision: http://reviews.llvm.org/D6923 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225630 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FreeBSD support for __clear_cache.Roman Divacky2015-01-111-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225610 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AsanInterceptsSignal in favor of (equivalent) IsDeadlySignal.Alexey Samsonov2015-01-094-16/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225556 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] use the right memory orderKostya Serebryany2015-01-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225546 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix memory leaks in GetListOfModules() users.Alexey Samsonov2015-01-084-18/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225472 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Remove the hardcoded limit of address ranges in LoadedModule.Alexey Samsonov2015-01-084-30/+38
| | | | | | This should fix https://code.google.com/p/address-sanitizer/issues/detail?id=368. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225469 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizers] Fix internal_lseek() to work on FreeBSDViktor Kutuzov2015-01-082-4/+8
| | | | | | | Differential Revision: http://reviews.llvm.org/D6825 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225443 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add flag quarantine_size_mb, deprecate quarantine_sizeKostya Serebryany2015-01-074-5/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225337 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Fix Go build.Alexey Samsonov2015-01-072-7/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225336 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Change the runtime flag representation.Alexey Samsonov2015-01-0720-499/+510
| | | | | | | | | | | This mirrors r225239 to all the rest sanitizers: ASan, DFSan, LSan, MSan, TSan, UBSan. Now the runtime flag type, name, default value and description is located in the single place in the .inc file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225327 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add a flag soft_rss_limit_mbKostya Serebryany2015-01-068-6/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225323 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Improve unit tests in COMPILER_RT_DEBUG=ON mode.Alexey Samsonov2015-01-062-0/+2
| | | | | | | Propagate -DSANITIZER_DEBUG definition to unit tests. Make sure unit tests depend on compiler-rt headers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225298 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Use COMMON_FLAG macro to describe common runtime flags.Alexey Samsonov2015-01-064-183/+143
| | | | | | | | | | | | | | | | | Summary: Introduce a single place where we specify flag type, name, default value, and description. This removes a large amount of boilerplate and ensures we won't leave flags uninitialized. Test Plan: regression test suite Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6851 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225239 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] partially enable -fsanitize-coverage=N with ubsan. It will work as ↵Kostya Serebryany2015-01-061-0/+1
| | | | | | usual in most cases but will not dump coverage on error with -fno-sanitize-recover (that'll be a separate fix) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225234 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan/tracing] write the trace using a sequence of internal_write calls ↵Kostya Serebryany2015-01-061-13/+23
| | | | | | instead of just one (otherwise files of > 2Gb are trunkated). Also a minor adjustment to the trace collection. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225230 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove TSAN_DEBUG in favor of SANITIZER_DEBUG.Alexey Samsonov2015-01-0317-38/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225111 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace DCHECK with DCHECK_LE where appropriate.Alexey Samsonov2015-01-031-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225110 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan/tracing] extend the test a bit more, simplify the tracing code, add a ↵Kostya Serebryany2015-01-031-8/+17
| | | | | | guard page to trace array, fix the trace IDs before dumping git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225108 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] simplify the tracing code, make it use the same guard variables as ↵Kostya Serebryany2015-01-031-43/+17
| | | | | | coverage git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225103 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert r224736: "[Sanitizer] Make CommonFlags immutable after ↵Alexey Samsonov2015-01-028-33/+69
| | | | | | | | | | | | | | | | initialization."" Fix test failures by introducing CommonFlags::CopyFrom() to make sure compiler doesn't insert memcpy() calls into runtime code. Original commit message: Protect CommonFlags singleton by adding const qualifier to common_flags() accessor. The only ways to modify the flags are SetCommonFlagsDefaults(), ParseCommonFlagsFromString() and OverrideCommonFlags() functions, which are only supposed to be called during initialization. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225088 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."Chandler Carruth2015-01-027-57/+33
| | | | | | | | | | We've got some internal users that either aren't compatible with this or have found a bug with it. Either way, this is an isolated cleanup and so I'm reverting it to un-block folks while we investigate. Alexey and I will be working on fixing everything up so this can be re-committed soon. Sorry for the noise and any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225079 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix coverage between fork() and exec(): reinitialize the guards after ↵Kostya Serebryany2014-12-302-11/+36
| | | | | | fork() git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225016 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add flag coverage_pcs. When false, the coverage is not dumped as PCs. ↵Kostya Serebryany2014-12-303-0/+6
| | | | | | Useful e.g. if the user only needs coverage is bitset git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225002 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] change _sanitizer_cov_module_init to accept int* instead of int**Kostya Serebryany2014-12-301-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224999 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to r224987: fix a lint warningTimur Iskhodzhanov2014-12-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224988 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Sort the list of modules when we fail to reserve the shadow ↵Timur Iskhodzhanov2014-12-301-20/+53
| | | | | | memory range git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224987 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases"Alexey Samsonov2014-12-301-26/+21
| | | | | | | | This reverts commit r221445. This change leads to false positives reports from -fsanitize=vptr. See original commit thread for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224972 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer-common] Fixing the ASan test build failure on OS XKuba Brecka2014-12-291-0/+4
| | | | | | | | The change in r224819 started using internal_unlink in a sanitizer_common unit test. For some reason, internal_unlink is not defined in sanitizer_mac.cc, fixing that. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224910 91177308-0d34-0410-b5e6-96231b3b80d8
* Escape ? to silence GCC warning about trigraphs.Daniel Jasper2014-12-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224863 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Treat \r, \n, \t as flag separators.Evgeniy Stepanov2014-12-262-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224858 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix possibly uninitialized coverage flag.Evgeniy Stepanov2014-12-261-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224857 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Add basic support for MemoryRangeIsAvailable and DumpProcessMap ↵Timur Iskhodzhanov2014-12-261-3/+42
| | | | | | to make it easier to debug startup shadow mapping failures git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224856 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Bump coverage size limit on 32-bit platforms.Evgeniy Stepanov2014-12-261-1/+1
| | | | | | | | This increases the limit from 4M locations to 16M, reserving 64Mb virtual memory. Chrome has >5M unique coverage locations with coverage=3. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224855 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-268-68/+102
| | | | | | | | | This is a re-commit of r224838 + r224839, previously reverted in r224850. Test failures were likely (still can not reproduce) caused by two lit tests using the same name for an intermediate build target. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224853 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan/Win] Suppress error messaging when Abort() is calledTimur Iskhodzhanov2014-12-261-2/+3
| | | | | | This will prevent ASan bots from hanging / timing out git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224852 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r224838, r224839.Evgeniy Stepanov2014-12-268-102/+68
| | | | | | | Flaky failures on the build bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224850 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Tweak sancov.py output.Evgeniy Stepanov2014-12-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224841 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] sancov.py: print status to stderrEvgeniy Stepanov2014-12-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224840 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Disable __sanitizer_cov_dump registration on Windows.Evgeniy Stepanov2014-12-251-0/+2
| | | | | | | Looks like we can't use atexit() during ASan initialization on Windows. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224839 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-258-68/+100
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224838 91177308-0d34-0410-b5e6-96231b3b80d8