summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Fix aarch64 sanitizer build with recent glibcKostya Serebryany2015-01-212-1/+7
| | | | | | | | | | | | | | | | | | glibc recently changed ABI on aarch64-linux: https://sourceware.org/git/?p=glibc.git;a=commit;h=5c40c3bab2fddaca8cfe12d75944d1fef8adf1a4 Instead of having unsigned short mode; unsigned short __pad1; it now has unsigned int mode; field in ipc_perm structure. This patch allows to build against the recent glibc and disables the ipc_perm.mode verification for older versions of glibc. I think it shouldn't be a big deal even for older glibcs, I couldn't find any place which would actually care about the exact mode field, rather than the whole structure, appart from the CHECK_SIZE_AND_OFFSET macro. Patch by Jakub Jelinek llvm-svn: 226637
* [asan] use MADV_NOHUGEPAGE for shadow to reduce the actual memory usageKostya Serebryany2015-01-214-0/+13
| | | | llvm-svn: 226636
* [asan] Allow changing verbosity in activation flags.Evgeniy Stepanov2015-01-203-3/+13
| | | | | | | This change removes some debug output in asan_flags.cc that was reading the verbosity level before all the flags were parsed. llvm-svn: 226566
* [asan] Warn if unsupported flags are used at activation.Evgeniy Stepanov2015-01-202-4/+9
| | | | llvm-svn: 226563
* [Sanitizers] Intercept statvfs() on FreeBSDViktor Kutuzov2015-01-191-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 226462
* [sanitizer] Make unrecognized flags not fatal.Evgeniy Stepanov2015-01-193-4/+38
| | | | | | Print a warning at verbosity=1 and higher instead of dying immediately. llvm-svn: 226458
* [sanitizer] Switch flag parsing to LowLevelAlloc.Evgeniy Stepanov2015-01-193-17/+19
| | | | | | | | | InternalAlloc is quite complex and its behavior may depend on the values of flags. As such, it should not be used while parsing flags. Sadly, LowLevelAlloc does not support deallocation of memory. llvm-svn: 226453
* [sanitizer] Simplify code in flag parser.Evgeniy Stepanov2015-01-191-5/+2
| | | | llvm-svn: 226452
* [Sanitizers] Order initialization of coverage and guard arraysViktor Kutuzov2015-01-191-1/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D6892 llvm-svn: 226440
* [sanitizer] Adjust max read size in FlagHandlerIncludeHal Finkel2015-01-171-1/+2
| | | | | | | | | | | Setting the maximum read size in FlagHandlerInclude to 2^15 might be a good default, but causes the read to fail on systems with a page size larger than that (ReadFileToBuffer(...) will fail if the maximum allowed size is less than the value returned by GetPageSizeCached()). For example, on my PPC64/Linux system, GetPageSizeCached() returns 2^16. In case the page size is larger, use that instead. llvm-svn: 226368
* [sanitizer] Additional error checking.Evgeniy Stepanov2015-01-163-7/+12
| | | | llvm-svn: 226279
* [Sanitizers] Intercept clock_gettime() on FreeBSDViktor Kutuzov2015-01-161-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 226276
* [Sanitizers] Intercept lgamma_r() on FreeBSDViktor Kutuzov2015-01-161-1/+1
| | | | | | Committed unreviewed with permission. llvm-svn: 226275
* [sanitizer] Fix bashism in check_lint.sh.Evgeniy Stepanov2015-01-161-1/+1
| | | | llvm-svn: 226267
* [sanitizer] Cleanup linter temporary files.Evgeniy Stepanov2015-01-161-1/+8
| | | | llvm-svn: 226266
* [sanitizer] Fix compiler warning in the flag parser code.Evgeniy Stepanov2015-01-161-4/+4
| | | | llvm-svn: 226263
* [sanitizer] Implement include= option.Evgeniy Stepanov2015-01-153-4/+42
| | | | | | Allows loading sanitizer options from file. llvm-svn: 226175
* [sanitizer] Flag parser rewrite.Evgeniy Stepanov2015-01-159-181/+318
| | | | | | | The new parser is a lot stricter about syntax, reports unrecognized flags, and will make it easier to implemented some of the planned features. llvm-svn: 226169
* [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. llvm-svn: 225637
* [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 llvm-svn: 225630
* [sanitizer] use the right memory orderKostya Serebryany2015-01-091-1/+1
| | | | llvm-svn: 225546
* Fix memory leaks in GetListOfModules() users.Alexey Samsonov2015-01-084-18/+33
| | | | llvm-svn: 225472
* [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. llvm-svn: 225469
* [Sanitizers] Fix internal_lseek() to work on FreeBSDViktor Kutuzov2015-01-082-4/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D6825 llvm-svn: 225443
* [TSan] Fix Go build.Alexey Samsonov2015-01-071-0/+6
| | | | llvm-svn: 225336
* [asan] add a flag soft_rss_limit_mbKostya Serebryany2015-01-065-4/+56
| | | | llvm-svn: 225323
* [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 llvm-svn: 225239
* [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. llvm-svn: 225230
* Remove TSAN_DEBUG in favor of SANITIZER_DEBUG.Alexey Samsonov2015-01-034-9/+12
| | | | llvm-svn: 225111
* [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 llvm-svn: 225108
* [asan] simplify the tracing code, make it use the same guard variables as ↵Kostya Serebryany2015-01-031-43/+17
| | | | | | coverage llvm-svn: 225103
* Revert "Revert r224736: "[Sanitizer] Make CommonFlags immutable after ↵Alexey Samsonov2015-01-022-1/+17
| | | | | | | | | | | | | | | | 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. llvm-svn: 225088
* Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."Chandler Carruth2015-01-021-11/+1
| | | | | | | | | | 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. llvm-svn: 225079
* [asan] fix coverage between fork() and exec(): reinitialize the guards after ↵Kostya Serebryany2014-12-302-11/+36
| | | | | | fork() llvm-svn: 225016
* [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 llvm-svn: 225002
* [asan] change _sanitizer_cov_module_init to accept int* instead of int**Kostya Serebryany2014-12-301-8/+11
| | | | llvm-svn: 224999
* Follow-up to r224987: fix a lint warningTimur Iskhodzhanov2014-12-301-1/+1
| | | | llvm-svn: 224988
* [ASan/Win] Sort the list of modules when we fail to reserve the shadow ↵Timur Iskhodzhanov2014-12-301-20/+53
| | | | | | memory range llvm-svn: 224987
* [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. llvm-svn: 224910
* Escape ? to silence GCC warning about trigraphs.Daniel Jasper2014-12-261-1/+1
| | | | llvm-svn: 224863
* [sanitizer] Treat \r, \n, \t as flag separators.Evgeniy Stepanov2014-12-262-1/+4
| | | | llvm-svn: 224858
* [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 llvm-svn: 224856
* [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. llvm-svn: 224855
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-263-42/+74
| | | | | | | | 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. llvm-svn: 224853
* [ASan/Win] Suppress error messaging when Abort() is calledTimur Iskhodzhanov2014-12-261-2/+3
| | | | | | This will prevent ASan bots from hanging / timing out llvm-svn: 224852
* Revert r224838, r224839.Evgeniy Stepanov2014-12-263-74/+42
| | | | | | Flaky failures on the build bots. llvm-svn: 224850
* [sanitizer] Tweak sancov.py output.Evgeniy Stepanov2014-12-251-1/+1
| | | | llvm-svn: 224841
* [sanitizer] sancov.py: print status to stderrEvgeniy Stepanov2014-12-251-1/+1
| | | | llvm-svn: 224840
* [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. llvm-svn: 224839
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-253-42/+72
| | | | llvm-svn: 224838
OpenPOWER on IntegriCloud