summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-07-30[asan] Fix typoFangrui Song
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338225 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-28Fix Asan-i386-calls-Test AddressSanitizer.ShadowGapTest on FreeBSDFangrui Song
0x22000000 happens to be on the left of a heap allocation and the error message is different (heap-buffer-overflow). FreeBSD NetBSD have larger SHADOW_OFFSET (0x40000000) but let's try not using #ifdef here. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338208 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26[tsan] Fix gcc pedantic warningDmitry Vyukov
Fix gcc (7.2.0) pedantic warning warning: extra ‘;’ [-Wpedantic] Author: jasonl220 (Jason Lovett) Review: https://reviews.llvm.org/D49817 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338023 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-26[sanitizer] Include signal.h instead of sys/signal.hFangrui Song
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338004 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-25[profile] Support profiling runtime on FuchsiaPetr Hosek
This ports the profiling runtime on Fuchsia and enables the instrumentation. Unlike on other platforms, Fuchsia doesn't use files to dump the instrumentation data since on Fuchsia, filesystem may not be accessible to the instrumented process. We instead use the data sink to pass the profiling data to the system the same sanitizer runtimes do. Differential Revision: https://reviews.llvm.org/D47208 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337881 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[sanitizer] Update symbolizer test.Matt Morehouse
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337872 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[libFuzzer] Handle unstable edges by disregarding unstable edgesMax Moroz
Summary: Added a new mode within flag -handle_unstable for new unstable handling algorithm that does the following: When an edge is shown as unstable, copy to UnstableCounters the value 0. During ApplyUnstableCounters we copy back the value 0 to ModuleInline8bitCounters if the edge was unstable. This way we would be ignoring completely features that were collected through non-determinism. Unstable hits would be counted as if it never hit. Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, morehouse Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49684 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337853 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[tsan] Fix crash in objc_sync_enter/objc_sync_exit when using an Obj-C ↵Kuba Mracek
tagged pointer Objective-C tagged pointers (either bottom-most or top-most bit is 1) are valid Obj-C objects but are not valid pointers. Make sure we don't crash on them when used in objc_sync_enter/objc_sync_exit. Instead, let's synchronize on a global object. Differential Revision: https://reviews.llvm.org/D49707 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337837 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[profile] Fix finding the first and last directory separators on Windows.Igor Kudrin
Until now, our code preferred backslashes to slashes, whereas Windows allows using both types of directory separators in one path string. Differential Revision: https://reviews.llvm.org/D49664 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337826 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[profile] Fix a possible memory leak in parseFilenamePattern().Igor Kudrin
Differential Revision: https://reviews.llvm.org/D49666 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337823 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[sanitizer][fuzzer] Temporarily transition to ZX_TIME_INFINITE_OLDPetr Hosek
This is a preparation for breaking change when all Zircon calls that take time as an argument will start using signed valued. We will transition back to ZX_TIME_INFITINE after all the changes to these symbols are done and become part of the Fuchsia SDK. Differential Revision: https://reviews.llvm.org/D49694 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337802 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24[sanitizer] Transition from _zx_vmar_... to _zx_vmar_..._old callsPetr Hosek
This is a preparation for breaking changes to _zx_vmar_... calls. We will transition back to _zx_vmar_... after all the changes to these symbols are done and become part of the Fuchsia SDK. Differential Revision: https://reviews.llvm.org/D49697 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337801 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24Revert "[Fuzzer] Update path to libc++ headers"Petr Hosek
This reverts commit r337775 since r337727 has been reverted in r337782. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337784 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[Fuzzer] Update path to libc++ headersPetr Hosek
The path to headers which are installed into libc++ build directory has changed in r337727 which broke the libFuzzer build. Differential Revision: https://reviews.llvm.org/D49705 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337775 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-23[libFuzzer] Handle unstable edges by using minimum hit countsMax Moroz
Summary: Created unstable_handle flag that takes 1 or 2, depending on the handling type. Modified RunOne to accommodate the following heuristic: Use the first CollectFeatures to count how many features there are. If no new features, CollectFeatures like before. If there is new feature, we run CB 2 more times, Check which edges are unstable per input and we store the least amount of hit counts for each edge. Apply these hit counts back to inline8bitcounters so that CollectFeatures can work as intended. Modified UnstableCounters to 8int_t and created a bitset UnstableSet to tell which edges are unstable. Patch by Kyungtak Woo (@kevinwkt). Reviewers: Dor1s, metzman, morehouse Reviewed By: Dor1s, morehouse Subscribers: delcypher, #sanitizers, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D49525 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337696 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20Mark REAL(swapcontext) with indirect_return attribute on x86H.J. Lu
When shadow stack from Intel CET is enabled, the first instruction of all indirect branch targets must be a special instruction, ENDBR. lib/asan/asan_interceptors.cc has ... int res = REAL(swapcontext)(oucp, ucp); ... REAL(swapcontext) is a function pointer to swapcontext in libc. Since swapcontext may return via indirect branch on x86 when shadow stack is enabled, as in this case, int res = REAL(swapcontext)(oucp, ucp); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This function may be returned via an indirect branch. Here compiler must insert ENDBR after call, like call *bar(%rip) endbr64 I opened an LLVM bug: https://bugs.llvm.org/show_bug.cgi?id=38207 to add the indirect_return attribute so that it can be used to inform compiler to insert ENDBR after REAL(swapcontext) call. We mark REAL(swapcontext) with the indirect_return attribute if it is available. This fixed: https://bugs.llvm.org/show_bug.cgi?id=38249 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D49608 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337603 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20On Darwin switch from the `VM_MEMORY_ANALYSIS_TOOL` VM tag toDan Liew
`VM_MEMORY_SANITIZER`. It turns out that `VM_MEMORY_ANALYSIS_TOOL` is already reserved for use by other tools so switch to a tag reserved for use by the Sanitizers. rdar://problem/41969783 Differential Revision: https://reviews.llvm.org/D49603 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337579 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[scudo] Simplify internal names (NFC)Kostya Kortchinsky
Summary: There is currently too much redundancy in the class/variable/* names in Scudo: - we are in the namespace `__scudo`, so there is no point in having something named `ScudoX` to end up with a final name of `__scudo::ScudoX`; - there are a lot of types/* that have `Allocator` in the name, given that Scudo is an allocator I figure this doubles up as well. So change a bunch of the Scudo names to make them shorter, less redundant, and overall simpler. They should still be pretty self explaining (or at least it looks so to me). The TSD part will be done in another CL (eg `__scudo::ScudoTSD`). Reviewers: alekseyshl, eugenis Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49505 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337557 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20esan: fix shadow setupDmitry Vyukov
r337531 changed return type of MmapFixedNoReserve, but esan wasn't updated. As the result esan shadow setup always fails. We probably need to make MmapFixedNoAccess signature consistent with MmapFixedNoReserve. But this is just to unbreak tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337550 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20[Xray] fix c99 warning build about flexible array semanticsDavid Carlier
Reviewers: dberris Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D49590 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337536 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-20sanitizers: consistently check result of MmapFixedNoReserveDmitry Vyukov
MmapFixedNoReserve does not terminate process on failure. Failure to check its result and die will always lead to harder to debug crashes later in execution. This was observed in Go processes due to some address space conflicts. Consistently check result of MmapFixedNoReserve. While we are here also add warn_unused_result attribute to prevent such bugs in future and change return type to bool as that's what all callers want. Reviewed in https://reviews.llvm.org/D49367 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337531 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] when -print_coverage=1 is given, print more stats (the number of ↵Kostya Serebryany
seeds that hit every given function) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337501 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[profile] Add interface to get profile filenameTeresa Johnson
Summary: Add __llvm_profile_get_filename interface to get the profile filename, which can be used for identifying which profile file belongs to an app when multiple binaries are instrumented and dumping profiles into the same directory. The filename includes the path. Reviewers: davidxl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49529 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337482 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[XRay][compiler-rt] Profiling: No files when emptyDean Michael Berris
This change makes it so that the profiling mode implementation will only write files when there are buffers to write. Before this change, we'd always open a file even if there were no profiles collected when flushing. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337443 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[XRay][compiler-rt] FDR Mode: Add extents metadata to bufferDean Michael Berris
When providing raw access to the FDR mode buffers, we used to not include the extents metadata record. This oversight means that processing the buffers in-memory will lose important information that would have been written in files. This change exposes the metadata record by serializing the data similarly to how we would do it when flushing to files. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337441 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[Xray] Fix allocator build, MAP_NORESERVE flag is not always supportedDavid Carlier
MAP_NORESERVE is not supported or a no-op on BSD. Reviewers: dberris Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D49494 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337440 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] fix the bot (the no-assert build)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337437 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-19[libFuzzer] first experimental attempt at DFT-based mutations ↵Kostya Serebryany
(DFT=data-flow-trace) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337434 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[Fuzzer] Improve crash unwinding on FuchsiaPetr Hosek
Fuchsia doesn't have signals; instead it expects processes to have a dedicated exception thread that binds to the process' exception port and waits for exception packets to be delivered. On the other hand, libFuzzer and sanitizer_common use expect to collect crash information via libunwind from the same thread that caused the exception. The long term fix is to improve support for remote unwinding in libunbwind, plumb this through sanitizer_common and libFuzzer, and handle the exception exclusively on the exception thread. In the meantime, this revision has the exception thread "resurrect" the crashing thread by: * saving its general purpose register state onto the crashing thread's stack, * setting the crashing thread's program counter to an assembly trampoline with the CFI information needed by libunwind, and * resuming the crashed thread. Patch By: aarongreen Differential Revision: https://reviews.llvm.org/D48509 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337418 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[libFuzzer] Create single template for visiting Inline8bitCountersMax Moroz
Summary: Created IterateInline8bitCounters, a single template for visiting Inline8bitCounters (nested for loop) Made InitializeUnstableCounters and UpdateUnstableCounters both send a lambda to IterateInline8bitCounters. Patch by Kyungtak Woo (@kevinwkt). Reviewers: Dor1s, metzman, kcc, morehouse Reviewed By: metzman, morehouse Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49453 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337403 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[XRay][compiler-rt] Segmented Array: Simplify and OptimiseDean Michael Berris
Summary: This is a follow-on to D49217 which simplifies and optimises the implementation of the segmented array. In this patch we co-locate the book-keeping for segments in the `__xray::Array<T>` with the data it's managing. We take the chance in this patch to actually rename `Chunk` to `Segment` to better align with the high-level description of the segmented array. With measurements using benchmarks landed in D48879, we've identified that calls to `pthread_getspecific` started dominating the cycles, which led us to revert the change made in D49217 to use C++ thread_local initialisation instead (it reduces the cost by a huge margin, since we save one PLT-based call to pthread functions in the hot path). In particular, this is in `__xray::getThreadLocalData()`. We also took the opportunity to remove the least-common-multiple based calculation and instead pack as much data into segments of the array. This greatly simplifies the API of the container which hides as much of the implementation details as possible. For instance, we calculate the number of elements we need for the each segment internally in the Array instead of making it part of the type. With the changes here, we're able to get a measurable improvement on the performance of profiling mode on top of what D48879 already provides. Depends on D48879. Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49363 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337343 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[XRay][compiler-rt] Simplify Allocator ImplementationDean Michael Berris
Summary: This change simplifies the XRay Allocator implementation to self-manage an mmap'ed memory segment instead of using the internal allocator implementation in sanitizer_common. We've found through benchmarks and profiling these benchmarks in D48879 that using the internal allocator in sanitizer_common introduces a bottleneck on allocating memory through a central spinlock. This change allows thread-local allocators to eliminate contention on the centralized allocator. To get the most benefit from this approach, we also use a managed allocator for the chunk elements used by the segmented array implementation. This gives us the chance to amortize the cost of allocating memory when creating these internal segmented array data structures. We also took the opportunity to remove the preallocation argument from the allocator API, simplifying the usage of the allocator throughout the profiling implementation. In this change we also tweak some of the flag values to reduce the amount of maximum memory we use/need for each thread, when requesting memory through mmap. Depends on D48956. Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49217 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337342 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-18[XRay][compiler-rt] FDR Mode: Allow multiple runsDean Michael Berris
Summary: Fix a bug in FDR mode which didn't allow for re-initialising the logging in the same process. This change ensures that: - When we flush the FDR mode logging, that the state of the logging implementation is `XRAY_LOG_UNINITIALIZED`. - Fix up the thread-local initialisation to use aligned storage and `pthread_getspecific` as well as `pthread_setspecific` for the thread-specific data. - Actually use the pointer provided to the thread-exit cleanup handling, instead of assuming that the thread has thread-local data associated with it, and reaching at thread-exit time. In this change we also have an explicit test for two consecutive sessions for FDR mode tracing, and ensuring both sessions succeed. Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49359 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337341 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17[libFuzzer] Mutation tracking and logging implemented.Max Moroz
Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337324 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17[builtins] Implement the __chkstk function for ARM for MinGWMartin Storsjo
This function is available for linking in from kernel32.dll, but it's not allowed to link that function from there in Windows Store apps. Differential Revision: https://reviews.llvm.org/D49055 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337313 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-17libFuzzer: prevent irrelevant strings from leaking into auto-dictionaryMatt Morehouse
This is a fix for bug 37047. https://bugs.llvm.org/show_bug.cgi?id=37047 Implemented by basically reversing the logic. Previously all strings were considered, with some operations excluded. Now strings are excluded by default, and only strings during the CB considered. Patch By: pdknsk Differential Revision: https://reviews.llvm.org/D48800 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337296 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Revert r337194 (https://reviews.llvm.org/D48891) due to compilation errors.Max Moroz
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337206 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[CMake] Use cxx-headers as a depedency for C++ headersPetr Hosek
We no longer pass CLANG_DEFAULT_CXX_STDLIB to the runtimes build as it was causing issues so we can no longer use this variable. We instead use cxx-headers as a dependency whenever this is available since both XRay and libFuzzer are built as static libraries so this is sufficient. Differential Revision: https://reviews.llvm.org/D49346 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337199 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Mutation tracking and logging implemented.Max Moroz
Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337194 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz
unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337187 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Revert r337175 (https://reviews.llvm.org/D49212) due to unintentional format ↵Max Moroz
changes. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337180 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Fix warnings in a static assert added to CFI.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337178 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16Test commitHenry Zhu
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337176 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz
unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337175 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[cfi] Don't pass a uint16_t to memset. Make sure the 16-bit constant is ↵Filipe Cabecinhas
appropriate for us. Reviewers: eugenis, pcc, kcc Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49252 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337170 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-16[XRay][compiler-rt] Use `SANITIZER_CXX_ABI_LIBRARY` for XRay unit testsDean Michael Berris
Summary: Fix a TODO in CMake config for XRay tests to use the detected C++ ABI library in the tests. Also make the tests depend on the llvm-xray target when built in-tree. Reviewers: kpw, eizan Reviewed By: eizan Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D49358 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337142 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[UBSan] Followup for silence_unsigned_overflow flag to handle negate overflows.Max Moroz
Summary: That flag has been introduced in https://reviews.llvm.org/D48660 for suppressing UIO error messages in an efficient way. The main motivation is to be able to use UIO checks in builds used for fuzzing as it might provide an interesting signal to a fuzzing engine such as libFuzzer. See https://github.com/google/oss-fuzz/issues/910 for more information. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49324 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337068 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13Fix for Darwin buildbot failure due to r337037Vlad Tsyrklevich
Duplicate __get_unsafe_stack_bottom instead of using an alias for platforms that don't suppport it like Darwin. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337044 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13SafeStack: Add builtins to read unsafe stack top/bottomVlad Tsyrklevich
Summary: Introduce built-ins to read the unsafe stack top and bottom. The unsafe stack top is required to implement garbage collection scanning for Oilpan. Currently there is already a built-in 'get_unsafe_stack_start' to read the bottom of the unsafe stack, but I chose to duplicate this API because 'start' is ambiguous (e.g. Oilpan uses WTF::GetStackStart to read the safe stack top.) Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D49152 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337037 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-13[sanitizer] Use -Wl,-z,global on AndroidKostya Kortchinsky
Summary: Use `-Wl,-z,global` for all Sanitizer shared libraries on Android. We want them to be in the global group (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#changes-to-library-search-order) to avoid any alloc/dealloc mismatch between the libc allocator & said library. `audioserver` was one of the binary that exhibited the problem with Scudo, this seems to fix it. [edited for accuracy] Reviewers: eugenis, alekseyshl Reviewed By: eugenis Subscribers: kubamracek, srhines, mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49198 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337010 91177308-0d34-0410-b5e6-96231b3b80d8