summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
Commit message (Collapse)AuthorAgeFilesLines
...
* [msan] Check sigset_t and sigaction arguments.Evgeniy Stepanov2017-09-051-5/+5
| | | | | | | | | | | | | | | | Summary: Check sigset_t arguments in ppoll, sig*wait*, sigprocmask interceptors, and the entire "struct sigaction" in sigaction. This can be done because sigemptyset/sigfullset are intercepted and signal masks should be correctly marked as initialized. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D37367 llvm-svn: 312576
* Finalize ASAN/NetBSDKamil Rytarowski2017-08-301-4/+0
| | | | | | | | | | | | | | | | | | | Summary: This revision contains various cleanups. Sponsored by <The NetBSD Foundation> Reviewers: kcc, vitalybuka, joerg, eugenis Reviewed By: kcc Subscribers: emaste, srhines, llvm-commits, kubamracek, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37244 llvm-svn: 312188
* [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse2017-08-302-0/+13
| | | | | | | | | | | | | | | | | | Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Only enable on Linux. Reviewers: vitalybuka, kcc, george.karpenkov Reviewed By: kcc Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37156 llvm-svn: 312185
* Revert "[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer"Matt Morehouse2017-08-292-13/+0
| | | | | | This reverts r312026 due to bot breakage. llvm-svn: 312047
* Enable GetRandom for Fuchsia sanitizer.Kostya Kortchinsky2017-08-291-0/+8
| | | | | | | | | | | | | | Summary: Adds a true implementation of GetRandom, to be used by scudo_utils.h. Reviewers: mcgrathr, phosek, kcc, vitalybuka, cryptoad Reviewed By: mcgrathr Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D37218 llvm-svn: 312046
* Re-enable stack depth instrumentation on Windows.Matt Morehouse2017-08-291-2/+2
| | | | | | | Specified tls_model attribute properly. Should compile on Windows now. llvm-svn: 312037
* Disable stack depth tracking on Windows.Matt Morehouse2017-08-291-1/+1
| | | | | | Windows doesn't support the tls_model attribute. llvm-svn: 312032
* [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse2017-08-292-0/+13
| | | | | | | | | | | | | | | | | | Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Disable stack depth tracking on Mac. Reviewers: vitalybuka, kcc, george.karpenkov Reviewed By: kcc Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37156 llvm-svn: 312026
* Add NetBSD specific version of sanitizer_platform_limits_posixKamil Rytarowski2017-08-288-1/+939
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD is an Open-Source POSIX-like BSD Operating System. 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, kcc, vitalybuka, filcab, fjricci Reviewed By: kcc Subscribers: llvm-commits, kubamracek, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37193 llvm-svn: 311933
* [sanitizer] Re-introduce kUseSeparateSizeClassForBatch for the 32-bit PrimaryKostya Kortchinsky2017-08-284-58/+100
| | | | | | | | | | | | | | | | | | | | | | | Summary: Currently `TransferBatch` are located within the same memory regions as "regular" chunks. This is not ideal for security: they make for an interesting target to overwrite, and are not protected by the frontend (namely, Scudo). To solve this, we re-introduce `kUseSeparateSizeClassForBatch` for the 32-bit Primary allowing for `TransferBatch` to end up in their own memory region. Currently only Scudo would use this new feature, the default behavior remains unchanged. The separate `kBatchClassID` was used for a brief period of time previously but removed when the 64-bit ended up using the "free array". Reviewers: alekseyshl, kcc, eugenis Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37082 llvm-svn: 311891
* [sanitizer] Do not over-dup string flagsKostya Kortchinsky2017-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: String flags values appear to be duped twice. Once in `FlagParser::parse_flag` using the `LowLevelAllocator` via `ll_strndup`, once in `FlagHandler<const char *>::Parse` using the `InternalAllocator` via `internal_strdup`. It looks like the second one is redundant, as the memory for the first one is never freed and not used for anything else. Assigning the value to the flag instead of duping it has a few advantages: - if it was the only use of the `InternalAllocator` (which is the case for Scudo), then the related code will not be compiled it, which saves us a whole instantiation of the CombinedAllocator worth of extra code; - in the event a string flag is parsed, the `InternalAllocator` would have created a whole SizeClassAllocator32 region for a single allocation, which is kind of wasteful. - also, the string is dup'ed twice for the whole lifetime of a process. I tested check-{sanitizer,asan,tsan,ubsan,scudo} successfully, so as far as I can tell this doesn't appear to have bad side effects. Reviewers: eugenis, alekseyshl Reviewed By: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D36970 llvm-svn: 311386
* [sanitizers CMake] NFC Refactor the logic for compiling and generating testsGeorge Karpenkov2017-08-151-34/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | into a function. Most CMake configuration under compiler-rt/lib/*/tests have almost-the-same-but-not-quite functions of the form add_X_[unit]tests for compiling and running the tests. Much of the logic is duplicated with minor variations across different sub-folders. This can harm productivity for multiple reasons: For newcomers, resulting CMake files are very large, hard to understand, and hide the intention of the code. Changes for enabling certain architectures end up being unnecessarily large, as they get duplicated across multiple folders. Adding new sub-projects requires more effort than it should, as a developer has to again copy-n-paste the configuration, and it's not even clear from which sub-project it should be copy-n-pasted. With this change the logic of compile-and-generate-a-set-of-tests is extracted into a function, which hopefully makes writing and reading CMake much easier. Differential Revision: https://reviews.llvm.org/D36116 llvm-svn: 310971
* [sanitizers] Add a blocking boolean to GetRandom prototypeKostya Kortchinsky2017-08-145-18/+31
| | | | | | | | | | | | | | | | | | | | | | Summary: On platforms with `getrandom`, the system call defaults to blocking. This becomes an issue in the very early stage of the boot for Scudo, when the RNG source is not set-up yet: the syscall will block and we'll stall. Introduce a parameter to specify that the function should not block, defaulting to blocking as the underlying syscall does. Update Scudo to use the non-blocking version. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D36399 llvm-svn: 310839
* [sanitizer_common] Update sanitizers w.r.t. the new comparisons ↵Alexander Potapenko2017-08-104-0/+20
| | | | | | | | | | | instrumentation API Added declarations of __sanitizer_cov_trace_const_cmp[1248] callbacks. For more details, please see https://reviews.llvm.org/D36465. Patch by Victor Chibotaru. llvm-svn: 310596
* [asan] Refactor thread creation bookkeepingVitaly Buka2017-08-091-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a pure refactoring change. It paves the way for OS-specific implementations, such as Fuchsia's, that can do most of the per-thread bookkeeping work in the creator thread before the new thread actually starts. This model is simpler and cleaner, avoiding some race issues that the interceptor code for thread creation has to do for the existing OS-specific implementations. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: alekseyshl Subscribers: phosek, filcab, llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36385 llvm-svn: 310432
* [asan] Complete the Fuchsia portVitaly Buka2017-08-092-1/+5
| | | | | | | | | | | | | | | | Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl, vitalybuka Reviewed By: vitalybuka Subscribers: filcab, vitalybuka, srhines, kubamracek, mgorny, phosek, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35865 llvm-svn: 310431
* Reuse sanitizer_linux for NetBSDKamil Rytarowski2017-08-082-18/+110
| | | | | | | | | | | | | | | | | | | | | Summary: Follow FreeBSD and reuse sanitizer_linux for NetBSD. 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, kcc, filcab, vitalybuka, fjricci, dvyukov Reviewed By: fjricci Subscribers: dvyukov, emaste, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36325 llvm-svn: 310411
* Define OFF_T as 64-bit integer on NetBSDKamil Rytarowski2017-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | | Summary: All 32 and 64 bit NetBSD platforms define off_t as 64-bit integer. 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, filcab, kcc, vitalybuka Reviewed By: vitalybuka Subscribers: emaste, kubamracek, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35553 llvm-svn: 310349
* [sanitizer] Remove use of task_for_pid from sanitizer_stoptheworld_mac.ccKuba Mracek2017-08-071-9/+1
| | | | | | | | Using task_for_pid to get the "self" task is not necessary, and it can fail (e.g. for sandboxed processes). Let's just use mach_task_self(). Differential Revision: https://reviews.llvm.org/D36284 llvm-svn: 310271
* Add NetBSD support in sanitizer_test_utils.hKamil Rytarowski2017-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD ships with printf_l(3) like FreeBSD. NetBSD does not ship with memalign, pvalloc, malloc with "usable size" and is the same here as Darwin, Android, FreeBSD and Windows. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, fjricci, filcab Reviewed By: vitalybuka Subscribers: srhines, llvm-commits, emaste, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36373 llvm-svn: 310248
* Add NetBSD support in sanitizer_errno.hKamil Rytarowski2017-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD ships with __errno (value for __errno_location) like Android. 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, fjricci, kcc, filcab Reviewed By: vitalybuka Subscribers: llvm-commits, srhines, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36360 llvm-svn: 310182
* Add NetBSD support in sanitizer_unwind_linux_libcdep.ccKamil Rytarowski2017-08-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD is a POSIX-like and BSD-family system. Reuse FreeBSD and Linux code. NetBSD uses DWARF ExceptionHandler. 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, kcc, filcab, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, emaste, llvm-commits, kubamracek, aprantl, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36314 llvm-svn: 310179
* Add NetBSD support in sanitizer_linux_libcdep.ccKamil Rytarowski2017-08-041-6/+10
| | | | | | | | | | | | | | | | | | | | | Summary: When possible reuse FreeBSD and Linux code. 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, kcc, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: srhines, emaste, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36320 llvm-svn: 310143
* Add NetBSD support in sanitizer_syscall_generic.incKamil Rytarowski2017-08-041-3/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds: - NetBSD specific aliases for renamed syscalls, - differentiate internal_syscall, internal_syscall64, internal_syscall_ptr as there are various types of syscalls on NetBSD. 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, kcc, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36316 llvm-svn: 310139
* Add NetBSD support in sanitizer_procmaps_freebsd.ccKamil Rytarowski2017-08-041-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds NetBSD specific: - ReadProcMaps() - MemoryMappingLayout::Next() This code is largely shared with FreeBSD. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: kcc, joerg, filcab, vitalybuka, fjricci Reviewed By: fjricci Subscribers: emaste, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35551 llvm-svn: 310116
* [compiler-rt] Check for empty buffer in Addr2LineProcess::ReadFromSymbolizerAlex Shlyapnikov2017-08-042-1/+5
| | | | | | | | | | | | | | | | | | | This fixes a bug in the ReadFromSymbolizer method of the Addr2LineProcess class; if the input is too large, the returned buffer will be null and will consequently fail the CHECK. The proposed fix is to simply check if the buffer consists of only a null-terminator and return if so (in effect skipping that frame). I tested by running one of the unit tests both before and after my change. Submitted on behalf of david-y-lam. Reviewers: eugenis, alekseyshl, kcc Reviewed By: alekseyshl Differential Revision: https://reviews.llvm.org/D36207 llvm-svn: 310089
* [asan] Allocator support for FuchsiaVitaly Buka2017-08-031-1/+1
| | | | | | | | | | | | | | | | Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: alekseyshl Subscribers: srhines, cryptoad, kubamracek, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36190 llvm-svn: 309914
* [sanitizer_common] Fuchsia-specific implementation of SanitizerCoverageVitaly Buka2017-08-023-0/+239
| | | | | | | | | | | | | | | | Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl, vitalybuka Reviewed By: kcc Subscribers: filcab, vitalybuka, phosek, llvm-commits, kubamracek, mgorny Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35866 llvm-svn: 309797
* [sanitizer_common] Fuchsia-specific symbolizerVitaly Buka2017-08-014-9/+130
| | | | | | | | | | | | | | | | | | | | Summary: Fuchsia doesn't support built-in symbolization per se at all. Instead, it always emits a Fuchsia-standard "symbolizer markup" format that makes it possible for a post-processing filter to massage the logs into symbolized format. Hence, it does not support user-specified formatting options for backtraces or other symbolization. Reviewers: vitalybuka, alekseyshl, kcc Subscribers: kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36032 llvm-svn: 309760
* [sanitizer_common] Fuchsia OS support codeVitaly Buka2017-08-014-1/+540
| | | | | | | | | | | | | | | | Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: cryptoad, srhines, kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36031 llvm-svn: 309756
* [sanitizer_common] Disable filesystem-related code for FuchsiaVitaly Buka2017-08-013-1/+22
| | | | | | | | | | | | | | | | | | | | Summary: Fuchsia doesn't support filesystem access per se at low level. So it won't use any of the filesystem-oriented code in sanitizer_common. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: kubamracek, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36029 llvm-svn: 309749
* [sanitizer_common] Fuchsia support for interceptorsVitaly Buka2017-08-011-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Actually Fuchsia non-support for interceptors. Fuchsia doesn't use interceptors in the common sense at all. Almost all system library functions don't need interception at all, because the system libraries are just themselves compiled with sanitizers enabled and have specific hook interfaces where needed to inform the sanitizer runtime about thread lifetimes and the like. For the few functions that do get intercepted, they don't use a generic mechanism like dlsym with RTLD_NEXT to find the underlying system library function. Instead, they use specific extra symbol names published by the system library (e.g. __unsanitized_memcpy). Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc, filcab Reviewed By: filcab Subscribers: kubamracek, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36028 llvm-svn: 309745
* [sanitizer-coverage] Fix Windows build broken by r309655Vitaly Buka2017-08-011-0/+4
| | | | llvm-svn: 309665
* [sanitizer-coverage] dummy definitions for ↵Kostya Serebryany2017-08-012-0/+4
| | | | | | __sanitizer_cov_8bit_counters_init and __sanitizer_cov_pcs_init llvm-svn: 309655
* [sanitizer_common] Add SANITIZER_FUCHSIAVitaly Buka2017-07-311-1/+7
| | | | | | | | | | | | | | | | | | Summary: More changes to follow will add the Fuchsia port. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, phosek, filcab Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36027 llvm-svn: 309539
* [sanitizer_common] Rename SI_NOT_WINDOWS to SI_POSIXVitaly Buka2017-07-312-88/+91
| | | | | | | | | | | | | | | | | | | | | Summary: New systems might be neither Windows nor POSIX. The SI_NOT_WINDOWS macro in sanitizer_platform_interceptors.h was already effectively the same as SI_POSIX, so just use SI_POSIX instead. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: phosek, filcab, llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36038 llvm-svn: 309536
* [sanitizers] Sanitizer tests CMake clean up: try #2George Karpenkov2017-07-281-15/+2
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309341
* [sancov] Implement __sanitizer_cov_reset.Evgeniy Stepanov2017-07-272-3/+13
| | | | | | | | | | | | Summary: Clears all collected coverage. Reviewers: kcc Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35958 llvm-svn: 309333
* Revert "[sanitizers] Sanitizer tests CMake clean up"George Karpenkov2017-07-271-2/+15
| | | | | | | | This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a. Fails on some bots, reverting until I can fix it. llvm-svn: 309318
* [sanitizers] Sanitizer tests CMake clean upGeorge Karpenkov2017-07-271-15/+2
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309306
* [sanitizer-coverage] remove stale codeKostya Serebryany2017-07-261-1/+0
| | | | llvm-svn: 309173
* [scudo] Check for pvalloc overflowKostya Kortchinsky2017-07-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously we were rounding up the size passed to `pvalloc` to the next multiple of page size no matter what. There is an overflow possibility that wasn't accounted for. So now, return null in the event of an overflow. The man page doesn't seem to indicate the errno to set in this particular situation, but the glibc unit tests go for ENOMEM (https://code.woboq.org/userspace/glibc/malloc/tst-pvalloc.c.html#54) so we'll do the same. Update the aligned allocation funtions tests to check for properly aligned returned pointers, and the `pvalloc` corner cases. @alekseyshl: do you want me to do the same in the other Sanitizers? Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek, alekseyshl, llvm-commits Differential Revision: https://reviews.llvm.org/D35818 llvm-svn: 309033
* Only scan global sections containing data in LSan on darwinFrancis Ricci2017-07-253-7/+19
| | | | | | | | | | | | | | | | | | | | Summary: __DATA segments on Darwin contain a large number of separate sections, many of which cannot actually contain pointers, and contain const values or objc metadata. Not scanning sections which cannot contain pointers significantly improves performance. On a medium-sized (~4000 files) internal project, I saw a speedup of about 30% in standalone LSan's execution time (30% improvement in the time spent running LSan, not the total program time). Reviewers: kcc, kubamracek, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35432 llvm-svn: 308999
* Fix unused variable warning with MemoryMappedSegment private dataFrancis Ricci2017-07-251-0/+2
| | | | llvm-svn: 308992
* Revert "[compiler-rt] Include thread ID into sanitizers logs"Vitaly Buka2017-07-251-4/+4
| | | | | | | | This improvement introduce additional dependencies on sandboxed environments. This reverts commit r308637. llvm-svn: 308984
* Add address ranges for individual macho sections on darwinFrancis Ricci2017-07-253-12/+82
| | | | | | | | | | | | | | | Summary: This is a re-upload of the reverted commit r308644. It has changed quite a bit to reflect post-commit comments by kcc, so I'm re-uploading as a new review. Reviewers: kubamracek, alekseyshl, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35799 llvm-svn: 308977
* Prefer atos to llvm-symbolizer on DarwinGeorge Karpenkov2017-07-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | atos is the default symbolizer on Apple's compiler for quite a few years now. llvm-symbolizer is quite fragile on Darwin: for example, unless a .dSYM file was explicitly generated symbolication would not work. It is also very convenient when the behavior of LLVM open source compiler matches to that of Apple's compiler on Apple's platform. Furthermore, llvm-symbolizer is not installed on Apple's platform by default, which leads to strange behavior during debugging: the test might fail under lit (where it has llvm-symbolizer) but would run properly when launched on the command line (where it does not, and atos would be used). Indeed, there's a downside: atos does not work properly with inlined functions, hence the test change. We do not think that this is a major problem, as users would often compile with -O0 when debugging, and in any case it is preferable to symbolizer not being able to symbolize. Differential Revision: https://reviews.llvm.org/D35745 llvm-svn: 308908
* [compiler-rt] Add missing const specifier to MemoryMappedSegment functionsFrancis Ricci2017-07-241-4/+4
| | | | llvm-svn: 308881
* [sanitizer_common] Move filesystem-related code out of sanitizer_common.ccVitaly Buka2017-07-2218-220/+297
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a pure refactoring change. It just moves code that is related to filesystem operations from sanitizer_common.{cc,h} to sanitizer_file.{cc,h}. This makes it cleaner to disable the filesystem-related code for a new port that doesn't want it. Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: vitalybuka, llvm-commits, kubamracek, mgorny, phosek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35591 llvm-svn: 308819
* Revert "Add MemoryMappedSection struct for two-level memory map iteration"Francis Ricci2017-07-202-57/+9
| | | | | | | | This probably broke lib0 tsan unit test on 10.11 buildbots This reverts commit 35ad307c385e384f47a7fb348c14b3602d3a33c4. llvm-svn: 308676
OpenPOWER on IntegriCloud