summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_libignore.cc
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* OpenBSD UBsan support enabling SANITIZER_OPENBSD widelyKamil Rytarowski2018-03-031-1/+2
| | | | | | | | | | | | | | | | Summary: Adding OpenBSD platform Patch by: David CARLIER Reviewers: krytarowski, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44049 llvm-svn: 326651
* [tsan] Separate the constants in libignore and bump the maximum for ↵Kuba Mracek2018-01-041-2/+2
| | | | | | | | | | instrumented libraries We're having some use cases where we have more than 128 (the current maximum) instrumented dynamic libraries loaded into a single process. Let's bump the limit to 1024, and separate the constants. Differential Revision: https://reviews.llvm.org/D41190 llvm-svn: 321782
* Honour 80-character line limitKamil Rytarowski2017-07-201-1/+2
| | | | llvm-svn: 308620
* Add NetBSD support in sanitizer_libignore.ccKamil Rytarowski2017-07-201-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Reuse Linux, FreeBSD and Apple code - no NetBSD specific changes. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, filcab, kcc Reviewed By: filcab Subscribers: emaste, kubamracek, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35628 llvm-svn: 308616
* [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress ↵Kuba Mracek2017-01-111-4/+29
| | | | | | | | | | | | | | false positive races On Darwin, we currently use 'ignore_interceptors_accesses', which is a heavy-weight solution that simply turns of race detection in all interceptors. This was done to suppress false positives coming from system libraries (non-instrumented code), but it also silences a lot of real races. This patch implements an alternative approach that should allow us to enable interceptors and report races coming from them, but only if they are called directly from instrumented code. The patch matches the caller PC in each interceptors. For non-instrumented code, we call ThreadIgnoreBegin. The assumption here is that the number of instrumented modules is low. Most likely there's only one (the instrumented main executable) and all the other modules are system libraries (non-instrumented). Differential Revision: https://reviews.llvm.org/D28264 llvm-svn: 291631
* tsan: switch libignore from /proc/self/maps to dl_iterate_phdrDmitry Vyukov2016-11-221-15/+16
| | | | | | | | | | /proc/self/maps can't be read atomically, this leads to episodic crashes in libignore as it thinks that a module is loaded twice. See the new test for an example. dl_iterate_phdr does not have this problem. Switch libignore to dl_iterate_phdr. llvm-svn: 287632
* Reapply r251918 ("[tsan] Fix build errors for TSan on OS X").Kuba Brecka2015-11-031-1/+1
| | | | llvm-svn: 251920
* Revert r251918 ("[tsan] Fix build errors for TSan on OS X").Kuba Brecka2015-11-031-1/+1
| | | | llvm-svn: 251919
* [tsan] Fix build errors for TSan on OS XKuba Brecka2015-11-031-1/+1
| | | | | | | | | | This patch moves a few functions from `sanitizer_linux_libcdep.cc` to `sanitizer_posix_libcdep.cc` in order to use them on OS X as well. Plus a few more small build fixes. This is part of an effort to port TSan to OS X, and it's one the very first steps. Don't expect TSan on OS X to actually work or pass tests at this point. Differential Revision: http://reviews.llvm.org/D14235 llvm-svn: 251918
* [sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar2015-09-301-6/+7
| | | | | | | | | | | | - 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
* Move more POSIX-specific functions to sanitizer_posix.hTimur Iskhodzhanov2015-04-091-0/+1
| | | | llvm-svn: 234482
* [Sanitizer] Drop LibIgnore dependency on SuppressionContext. NFC.Alexey Samsonov2015-02-191-16/+10
| | | | | | | | Let each LibIgnore user (for now it's only TSan) manually go through SuppressionContext and pass ignored library templates to LibIgnore. llvm-svn: 229924
* Replace InternalScopedBuffer<char> with InternalScopedString where applicable.Alexey Samsonov2014-12-021-3/+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] Bump kMaxPathLength to 4096 and use it more extensively instead ↵Alexey Samsonov2014-11-261-2/+2
| | | | | | of hardcoded constants llvm-svn: 222803
* Enable sanitizers' libignore on FreeBSDViktor Kutuzov2014-09-061-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D5205 llvm-svn: 217306
* [sanitizer] Introduce VReport and VPrintf macros and use them in sanitizer code.Sergey Matveev2013-12-051-3/+4
| | | | | | Instead of "if (common_flags()->verbosity) Report(...)" we now have macros. llvm-svn: 196497
* tsan: refactor libignore implementationDmitry Vyukov2013-10-161-33/+34
| | | | llvm-svn: 192785
* tsan: refactor overly-complex logical conditionDmitry Vyukov2013-10-151-25/+31
| | | | llvm-svn: 192698
* tsan: resolve symlinks for called_from_lib suppressionsDmitry Vyukov2013-10-151-4/+17
| | | | llvm-svn: 192688
* tsan: ignore interceptors coming from specified librariesDmitry Vyukov2013-10-031-0/+85
LibIgnore allows to ignore all interceptors called from a particular set of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions from the provided SuppressionContext; finds code ranges for the libraries; and checks whether the provided PC value belongs to the code ranges. Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib, then must call our internal allocator instead of libc malloc. llvm-svn: 191897
OpenPOWER on IntegriCloud