summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer-coverage] nuke more stale codeKostya Serebryany2017-06-021-610/+0
| | | | llvm-svn: 304504
* [sanitizer-coverage] nuke more stale codeKostya Serebryany2017-06-021-13/+0
| | | | llvm-svn: 304503
* [sanitizer-coverage] nuke more stale codeKostya Serebryany2017-06-011-4/+0
| | | | llvm-svn: 304500
* [sanitizer-coverage] remove stale code (old coverage); compiler-rt part Kostya Serebryany2017-05-311-41/+6
| | | | llvm-svn: 304318
* [sanitizer-coverage] add a deprecation note for the old sanitizer-coverage; ↵Kostya Serebryany2017-05-021-0/+7
| | | | | | remove a TODO printf llvm-svn: 301889
* [sanitizer-coverage] remove more stale codeKostya Serebryany2017-05-011-31/+0
| | | | llvm-svn: 301845
* [sanitizer-coverage] disable coverage_direct=1, will remove the code in a ↵Kostya Serebryany2017-05-011-0/+2
| | | | | | few weeks llvm-svn: 301826
* [sanitizer-coverage] remove more unused codeKostya Serebryany2017-04-191-18/+0
| | | | llvm-svn: 300780
* [sanitizer-coverage] remove run-time support for ↵Kostya Serebryany2017-04-191-105/+0
| | | | | | -fsanitize-coverage=indirect-calls llvm-svn: 300775
* [sanitizer-coverage] remove run-time support for -fsanitize-coverage=trace-bbKostya Serebryany2017-04-191-111/+0
| | | | llvm-svn: 300766
* [sanitizer-coverage] remove run-time support for the deprecated ↵Kostya Serebryany2017-04-191-117/+0
| | | | | | -fsanitize-coverage=8bit-counters llvm-svn: 300745
* [compiler-rt][asan|win] Fix flaky unittest due to large allocationsEtienne Bergeron2017-02-141-1/+5
| | | | | | | | | | | | | | | | | | Summary: Coverage is using large arrays which requires large allocations. These allocations are flaky and often failing on win64. We are using the 32-bits size until this gets a better fix. Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits, kubamracek, chrisha, dberris Differential Revision: https://reviews.llvm.org/D29945 llvm-svn: 295086
* General definition for weak functionsMarcos Pividori2017-01-291-22/+11
| | | | | | | | | | | | | | | | | | In this diff, I define a general macro for defining weak functions with a default implementation: "SANITIZER_INTERFACE_WEAK_DEF()". This way, we simplify the implementation for different platforms. For example, we cannot define weak functions on Windows, but we can use linker pragmas to create an alias to a default implementation. All of these implementation details are hidden in the new macro. Also, as I modify the name for exported weak symbols on Windows, I needed to temporarily disable "dll_host" test for asan, which checks the list of functions included in asan_win_dll_thunk. Differential Revision: https://reviews.llvm.org/D28596 llvm-svn: 293419
* [asan] fix __sanitizer_cov_with_check to get the correct caller PC. Before ↵Kostya Serebryany2017-01-251-1/+2
| | | | | | this fix the code relied on the fact that the other function (__sanitizer_cov) is inlined. This was true with clang builds on x86, but not true with gcc builds on x86 and on PPC. This caused bot redness after r292862 llvm-svn: 292998
* Fix pc_array bounds check to use elements instead of bytesReid Kleckner2017-01-241-2/+1
| | | | | | | | | | pc_array_size and kPcArrayMaxSize appear to be measured in elements, not bytes, so we shouldn't multiply idx by sizeof(uptr) in this bounds check. 32-bit Chrome was tripping this assertion because it has 64 million coverage points. I don't think it's worth adding a test that has that many coverage points. llvm-svn: 292955
* Remove SANITIZER_LINUX ifdefsReid Kleckner2017-01-131-2/+0
| | | | | | | Somehow this causes lots of test failures on Windows. These appear to have been accidentally added back in r291736. llvm-svn: 291947
* Revert "[sancov] moving sancov rt to sancov/ directory"Mike Aizatsky2017-01-121-0/+2
| | | | | | | | This reverts commit https://reviews.llvm.org/rL291734 Reason: mac breakage http://lab.llvm.org:8080/green//job/clang-stage1-configure-RA_build/28798/consoleFull#1657087648e9a0fee5-ebcc-4238-a641-c5aa112c323e llvm-svn: 291736
* [sancov] there are windows tests that check linker symbolsMike Aizatsky2017-01-121-2/+0
| | | | llvm-svn: 291735
* [sancov] moving sancov rt to sancov/ directoryMike Aizatsky2017-01-121-0/+2
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28541 llvm-svn: 291734
* [sancov] __sanitizer_dump_coverage apiMike Aizatsky2016-12-121-4/+1
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D26758 llvm-svn: 289498
* [sanitizer-coverage] remove stale code, second attempt after failed r282994Kostya Serebryany2016-10-041-24/+0
| | | | llvm-svn: 283185
* Revert "[sanitizer-coverage] remove stale code" at it breaks Windows bot.Vitaly Buka2016-10-041-0/+24
| | | | | | This reverts commit r282994. llvm-svn: 283183
* [sanitizer-coverage] remove stale codeKostya Serebryany2016-10-011-24/+0
| | | | llvm-svn: 282994
* [asan] fix window buildKostya Serebryany2016-09-151-0/+2
| | | | llvm-svn: 281679
* [asan] provide dummy implementations for __sanitizer_cov_trace_pc_*Kostya Serebryany2016-09-151-0/+6
| | | | llvm-svn: 281677
* [compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-0/+2
| | | | | | | | | | | | The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 llvm-svn: 281657
* [sanitizer-coverage] add two more modes of instrumentation: trace-div and ↵Kostya Serebryany2016-08-301-0/+6
| | | | | | trace-gep, mostly usaful for value-profile-based fuzzing; run-time part llvm-svn: 280045
* [sanitizer-coverage] add __sanitizer_cov_trace_cmp[1248] to the ↵Kostya Serebryany2016-08-181-0/+8
| | | | | | sanitizer-coverage interface llvm-svn: 279026
* [sanitizers] trace buffer API to use user-allocated buffer.Mike Aizatsky2016-08-051-11/+16
| | | | | | | | Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D23186 llvm-svn: 277858
* Reduce coverage PC buffer size on 32-bit Windows to match 32-bit LinuxReid Kleckner2016-08-031-3/+2
| | | | | | | | | | | | | | | | | | | | | In r235779, Timur bumped the buffer size up to 1<<27, or about 134 million coverage points, presumably to handle Chrome. We allocate two arrays of uptrs with this size, and this reliably exhausts all available address space on 32-bit Windows (2 allocations of 512MB) when ASan is also enabled. Let's reduce the buffer size for now to stabilize the test suite. We can re-evaluate the approach later when we've brought the Chrome ASan builders back to life. Kostya said that Mike reduced the number of instrumented coverage points that LLVM emits by half since Timur made this change, so reducing this array size should also be safe. With this change, the 32-bit ASan tests reliably pass for me on Windows 10. llvm-svn: 277558
* [Sanitizer] Introduce ListOfModules object and use it to replace ↵Alexey Samsonov2016-02-221-5/+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
* [sancov] use GetLoadedModules for list of modules rather than sanitizer's list.Mike Aizatsky2016-02-191-12/+33
| | | | llvm-svn: 261376
* [sancov] improved object files handling.Mike Aizatsky2016-02-121-10/+4
| | | | | | | | | | Updating sancov invocation on html_cov_dump. sancov change: http://reviews.llvm.org/D17169 Differential Revision: http://reviews.llvm.org/D17171 llvm-svn: 260629
* GetArgv returns null on widnows, do not crashMike Aizatsky2016-01-281-2/+4
| | | | llvm-svn: 259005
* [sanitizers] generating html report on coverage dumpMike Aizatsky2016-01-271-0/+35
| | | | | | | | Subscribers: tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D16374 llvm-svn: 258999
* using const instead of constexpr: MSVC troublesMike Aizatsky2016-01-191-2/+2
| | | | llvm-svn: 258253
* [sancov] NFC: simplifying DumpOffsets.Mike Aizatsky2016-01-191-29/+38
| | | | | | | | | Summary: Extracting GetRangeOffset function before report-on-dump functionality. Differential Revision: http://reviews.llvm.org/D16332 llvm-svn: 258211
* [sancov] coverage pc bufferMike Aizatsky2016-01-051-0/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D15871 llvm-svn: 256804
* [sanitizer coverage] when adding a bb trace instrumentation, do it instead, ↵Kostya Serebryany2015-12-021-5/+7
| | | | | | not in addition to, regular coverage. Do the regular coverage in the run-time instead llvm-svn: 254483
* [sanitizer coverage] reset global counters in __sanitizer_reset_coverageKostya Serebryany2015-11-111-0/+6
| | | | llvm-svn: 252815
* sanitizer: speedup coverage by 33%Dmitry Vyukov2015-11-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atomic RMW is not necessary in InitializeGuardArray. It is supposed to run when no user code runs. And if user code runs concurrently, then the atomic RMW won't help anyway. So replace it with non-atomic RMW. InitializeGuardArray takes more than 50% of time during re2 fuzzing: real 0m47.215s 51.56% a.out a.out [.] __sanitizer_reset_coverage 6.68% a.out a.out [.] __sanitizer_cov 3.41% a.out a.out [.] __sanitizer::internal_bzero_aligned16(void*, unsigned long) 1.79% a.out a.out [.] __asan::Allocator::Allocate(unsigned long, unsigned long, With this change: real 0m31.661s 26.21% a.out a.out [.] sanitizer_reset_coverage 10.12% a.out a.out [.] sanitizer_cov 5.38% a.out a.out [.] __sanitizer::internal_bzero_aligned16(void*, unsigned long) 2.53% a.out a.out [.] __asan::Allocator::Allocate(unsigned long, unsigned long, That's 33% speedup. Reviewed in http://reviews.llvm.org/D14537 llvm-svn: 252715
* [sanitizer-coverage] introduce __sanitizer_get_total_unique_caller_callee_pairsKostya Serebryany2015-10-221-1/+7
| | | | llvm-svn: 251071
* [sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar2015-09-301-3/+3
| | | | | | | | | | | | - 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
* [Sanitizer] Dump coverage if we're killing the program with __sanitizer::Die().Alexey Samsonov2015-08-241-0/+6
| | | | | | | | | | | Previously we had to call __sanitizer_cov_dump() from tool-specific callbacks - instead, let sanitizer_common library handle this in a single place. This is a re-application of r245770, with slightly different approach taken. llvm-svn: 245890
* Revert r245770 and r245777.Alexey Samsonov2015-08-221-3/+1
| | | | | | | These changes break both autoconf Mac OS X buildbot (linker errors due to wrong Makefiles) and CMake buildbot (safestack test failures). llvm-svn: 245784
* [Sanitizer] Dump coverage if we're killing the program with __sanitizer::Die().Alexey Samsonov2015-08-221-1/+3
| | | | | | | Previously we had to call __sanitizer_cov_dump() from tool-specific callbacks - instead, let sanitizer_common library handle this in a single place. llvm-svn: 245770
* [libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and ↵Kostya Serebryany2015-07-311-1/+3
| | | | | | sanitizer coverage. Also fix pedantic warnings llvm-svn: 243721
* [asan/fuzzer] define a dummy weak __sanitizer_cov_trace_cmpKostya Serebryany2015-05-081-0/+3
| | | | llvm-svn: 236907
* [asancov] Fix coverage reserving 4x the necessary amount of memory on fork.Evgeniy Stepanov2015-05-011-1/+2
| | | | llvm-svn: 236294
* [ASan/Win] Increase the size of the PC array for coverage on WindowsTimur Iskhodzhanov2015-04-241-2/+3
| | | | llvm-svn: 235779
OpenPOWER on IntegriCloud