summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer-coverage] nuke more stale codeKostya Serebryany2017-06-021-122/+0
| | | | llvm-svn: 304503
* [Sanitizer] Introduce ListOfModules object and use it to replace ↵Alexey Samsonov2016-02-221-10/+6
| | | | | | | | | | | | | | | | | | | | GetListOfModules(). Summary: This removes the hard limit on the number of loaded modules (used to be 16K), and makes it easier to use LoadedModules w/o causing a memory leak: ListOfModules owns the modules, and makes sure to properly clean them in destructor. Remove filtering functionality that is only needed in one place (LSan). Reviewers: aizatsky Subscribers: llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D17470 llvm-svn: 261554
* sanitizer_common: C++ify the IntrusiveList iterator interface.Peter Collingbourne2016-01-151-5/+4
| | | | llvm-svn: 257858
* [sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar2015-09-301-2/+2
| | | | | | | | | | | | - Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 llvm-svn: 248964
* Use error_t rather than int in a couple of places where we handle filesTimur Iskhodzhanov2015-04-091-1/+1
| | | | llvm-svn: 234491
* Use RenameFile instead of internal_rename in non-POSIX codeTimur Iskhodzhanov2015-04-091-2/+1
| | | | llvm-svn: 234490
* Use WriteToFile instead of internal_write in non-POSIX codeTimur Iskhodzhanov2015-04-091-2/+1
| | | | llvm-svn: 234487
* Introduce CloseFile to be used instead of internal_close on non-POSIXTimur Iskhodzhanov2015-04-091-1/+1
| | | | llvm-svn: 234481
* [Sanitizers] Make OpenFile more portableTimur Iskhodzhanov2015-04-081-2/+2
| | | | llvm-svn: 234410
* [ASan] Unify handling of loaded modules between POSIX and WindowsTimur Iskhodzhanov2015-04-061-1/+0
| | | | | | Reviewed at http://reviews.llvm.org/D8805 llvm-svn: 234150
* [Sanitizer] Be consistent about separating ==%PID== and logged data.Alexey Samsonov2015-03-311-1/+1
| | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=385. llvm-svn: 233720
* [ASan] Distinguish between read, write and read-write file access modes in ↵Alexander Potapenko2015-03-231-1/+1
| | | | | | | | OpenFile. This is to fix mapping coverage files into memory on OSX. llvm-svn: 232936
* Fix memory leaks in GetListOfModules() users.Alexey Samsonov2015-01-081-17/+21
| | | | llvm-svn: 225472
* [Sanitizer] Remove the hardcoded limit of address ranges in LoadedModule.Alexey Samsonov2015-01-081-5/+6
| | | | | | This should fix https://code.google.com/p/address-sanitizer/issues/detail?id=368. llvm-svn: 225469
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-261-8/+7
| | | | | | | | 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
* Revert r224838, r224839.Evgeniy Stepanov2014-12-261-7/+8
| | | | | | Flaky failures on the build bots. llvm-svn: 224850
* [asan] Allow enabling coverage at activation.Evgeniy Stepanov2014-12-251-8/+7
| | | | llvm-svn: 224838
* [asan] Fix line >80 chars.Evgeniy Stepanov2014-12-231-1/+2
| | | | llvm-svn: 224763
* [asan] Better error message in coverage.Evgeniy Stepanov2014-12-231-2/+2
| | | | llvm-svn: 224762
* Replace InternalScopedBuffer<char> with InternalScopedString where applicable.Alexey Samsonov2014-12-021-5/+3
| | | | | | | | | | | | | | | | Summary: No functionality change. Test Plan: make check-all Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6472 llvm-svn: 223164
* [Sanitizer] Get rid of unnecessary allocations in StripModuleName. NFC.Alexey Samsonov2014-11-041-2/+1
| | | | llvm-svn: 221287
* [asan] Exclude non-executable mappings from coverage.Evgeniy Stepanov2014-06-111-6/+8
| | | | llvm-svn: 210649
* [asancov] Faster coverage in memory-mapped mode.Evgeniy Stepanov2014-06-051-14/+19
| | | | | | | | Use caller pc of __sanitizer_cov_module_init to figure out when 2 sequential calls are from the same module; skip .sancov.map file update in this case. llvm-svn: 210267
* [sancov] Handle fork.Evgeniy Stepanov2014-06-041-5/+22
| | | | | | | | | | Reset coverage data on fork(). For memory-mapped mode (coverage_direct=1) this helps avoid loss of data (before this change two processes would write to the same file simultaneously). For normal mode, this reduces coverage dump size, because PCs from the parent process are no longer inherited by the child. llvm-svn: 210180
* [sancov] Fix map update logic on Android.Evgeniy Stepanov2014-06-031-28/+31
| | | | | | | dlopen()/dlclose() are not interceptable on Android, so we update .sancov.map in module constructor callbacks. llvm-svn: 210098
* [sanitizer] Add coverage_dir flag.Evgeniy Stepanov2014-05-291-7/+11
| | | | llvm-svn: 209815
* [asancov] Write coverage directly to a memory-mapped file.Evgeniy Stepanov2014-05-271-0/+97
This way does not require a __sanitizer_cov_dump() call. That's important on Android, where apps can be killed at arbitrary time. We write raw PCs to disk instead of module offsets; we also write memory layout to a separate file. This increases dump size by the factor of 2 on 64-bit systems. llvm-svn: 209653
OpenPOWER on IntegriCloud