summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* Shorten filenames of tests (-with-calls to -calls)Kamil Rytarowski2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD's 8(beta) versions of kernel functions to retrieve program name (vnode to path translator) and process memory map have internal limit of processing filenames with maximum of 31 characters. Filenames like Asan-x86_64-with-calls-Noinst-Test break this limit and affect tests. Rename "-with-calls" to "-calls". This changes fixes all issues for the Address Sanitizer test target (check-asan) on the current NetBSD support caused by long filenames. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, filcab, fjricci, kcc Reviewed By: vitalybuka Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37149 llvm-svn: 311966
* Add NetBSD ASAN shadow mapping for x86-64Kamil Rytarowski2017-08-281-0/+10
| | | | | | | | | | | | | | | | | | | | Summary: The maximal virtual address on NetBSD/amd64 is 0x7f7ffffff000. Define shadow offset 0x400000000000 (1ULL << 46). Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, filcab, fjricci, kcc, eugenis, pcc Reviewed By: kcc Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36587 llvm-svn: 311937
* Reland r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311924
* [asan] Move __asan_handle_no_return to public headerPetr Hosek2017-08-281-0/+8
| | | | | | | | | | | | | | Heretofore asan_handle_no_return was used only by interceptors, i.e. code private to the ASan runtime. However, on systems without interceptors, code like libc++abi is built with -fsanitize=address itself and should call asan_handle_no_return directly from __cxa_throw so that no interceptor is required. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D36811 llvm-svn: 311869
* Revert r311842 - [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-272-3/+3
| | | | | | | The required change in clang is being reverted because of the Android build bot failure. llvm-svn: 311859
* [cmake] Remove i686 target that is duplicate to i386Michal Gorny2017-08-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit i686 target that is completely duplicate to the i386 target, with the latter being used more commonly. 1. The runtime built for i686 will be identical to the one built for i386. 2. Supporting both -i386 and -i686 suffixes causes unnecessary confusion on the clang end which has to expect either of them. 3. The checks are based on wrong assumption that __i686__ is defined for all newer x86 CPUs. In fact, it is only declared when -march=i686 is explicitly used. It is not available when a more specific (or newer) -march is used. Curious enough, if CFLAGS contain -march=i686, the runtime will be built both for i386 and i686. For any other value, only i386 variant will be built. Differential Revision: https://reviews.llvm.org/D26764 llvm-svn: 311842
* Fix ASan version list dependency in multi-arch builds.Evgeniy Stepanov2017-08-211-5/+6
| | | | | | | | Fixes PR32390. Patch by Andrey Krayniak. llvm-svn: 311394
* [sanitizers CMake] NFC Refactor the logic for compiling and generating testsGeorge Karpenkov2017-08-151-113/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CMake compiler-rt] NFC: Minor CMake refactoring.George Karpenkov2017-08-151-6/+1
| | | | | | | | | Detect ObjC files in `clang_compile` and pass an appropriate flag to a compiler, also change `clang_compile` to a function. Differential Revision: https://reviews.llvm.org/D36727 llvm-svn: 310945
* [compiler-rt CMake] CMake refactoring: create directories in helper func.George Karpenkov2017-08-151-5/+0
| | | | | | | | | Change macro to a function, move creating test directory into `add_compiler_rt_test`. Differential Revision: https://reviews.llvm.org/D36724 llvm-svn: 310943
* Add NetBSD support in asan_linux.ccKamil Rytarowski2017-08-101-2/+15
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: fjricci, vitalybuka, joerg, kcc, filcab Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36488 llvm-svn: 310647
* [asan] Refactor thread creation bookkeepingVitaly Buka2017-08-094-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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-098-6/+243
| | | | | | | | | | | | | | | | 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
* Try to appease compiler and break multiline comment.Kamil Rytarowski2017-08-081-2/+2
| | | | llvm-svn: 310428
* Add NetBSD support in asan_malloc_linux.ccKamil Rytarowski2017-08-081-2/+4
| | | | | | | | | | | | | | | | | | | Summary: 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, fjricci, vitalybuka, filcab Reviewed By: fjricci Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36376 llvm-svn: 310414
* Add NetBSD support in asan_symbolize.pyKamil Rytarowski2017-08-081-2/+2
| | | | | | | | | | | | | | | | | | | Summary: 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, vitalybuka, kcc, fjricci Reviewed By: fjricci Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36484 llvm-svn: 310413
* Add NetBSD support in asan_interceptors.ccKamil Rytarowski2017-08-081-0/+5
| | | | | | | | | | | | | | | | | | | Summary: 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: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36470 llvm-svn: 310400
* NetBSD compatibility nit in asan_test_utils.hKamil Rytarowski2017-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Do not include <malloc.h> on NetBSD, as this header serves on this OS backward compatibility with K&R alias for <stdlib.h>. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, kcc, joerg, filcab, fjricci Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36469 llvm-svn: 310391
* [asan] Restore dead-code-elimination optimization for FuchsiaVitaly Buka2017-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r310244 fixed a bug introduced by r309914 for non-Fuchsia builds. In doing so it also reversed the intended effect of the change for Fuchsia builds, which was to allow all the AllocateFromLocalPool code and its variables to be optimized away entirely. This change restores that optimization for Fuchsia builds, but doesn't have the original change's bug because the comparison arithmetic now takes into account the size of the elements. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36430 llvm-svn: 310330
* Fix asan_test.cc build on NetBSDKamil Rytarowski2017-08-071-10/+20
| | | | | | | | | | | | | | | | | | | | | | | Summary: Include <stdarg.h> for variable argument list macros (va_list, va_start etc). Add fallback definition of _LIBCPP_GET_C_LOCALE, this is required for GNU libstdc++ compatibility. Define new macro SANITIZER_GET_C_LOCALE. This value is currently required for FreeBSD and NetBSD for printf_l(3) tests. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, filcab, fjricci Reviewed By: vitalybuka Subscribers: llvm-commits, emaste, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36406 llvm-svn: 310323
* Add NetBSD support in asan_stack.hKamil Rytarowski2017-08-071-1/+2
| | | | | | | | | | | | | | | | | | | Summary: 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: vitalybuka Subscribers: davide, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36377 llvm-svn: 310322
* Add NetBSD support in asan_errors.ccKamil Rytarowski2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | Summary: 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, fjricci, vitalybuka, filcab, kcc Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36374 llvm-svn: 310247
* Add NetBSD support in asan_interceptors.hKamil Rytarowski2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | Summary: 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, fjricci, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36375 llvm-svn: 310246
* [asan] Return sizeof missed by r309914Vitaly Buka2017-08-071-1/+1
| | | | llvm-svn: 310244
* [asan] Check for pvalloc overlowKostya Kortchinsky2017-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | Summary: Last one of the `pvalloc` overflow checks! `CheckForPvallocOverflow` was introduced with D35818 to detect when `pvalloc` would wrap when rounding up to the next multiple of the page size. Add this check to ASan's `pvalloc` implementation. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D36257 llvm-svn: 310119
* [asan] Allocator support for FuchsiaVitaly Buka2017-08-032-22/+34
| | | | | | | | | | | | | | | | 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
* Add new ASAN_OPTION: sleep_after_init.Kostya Serebryany2017-08-022-0/+9
| | | | | | | | | | | | | | Summary: As mentioned in https://github.com/google/sanitizers/issues/834, suggested option can be handy for debugging. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35409 llvm-svn: 309854
* [asan] Interceptors for FuchsiaVitaly Buka2017-08-023-13/+40
| | | | | | | | | | | | | | | | | | | | Summary: Fuchsia uses the "memintrinsics" interceptors, though not via any generalized interception mechanism. It doesn't use any other interceptors. 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/D36189 llvm-svn: 309798
* [asan] Move shadow memory setup into its own fileVitaly Buka2017-07-314-125/+150
| | | | | | | | | | | | | | Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Subscribers: kubamracek, mgorny, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36037 llvm-svn: 309542
* [sanitizer tests CMake] Factor out CMake logic for compiling sanitizer testsGeorge Karpenkov2017-07-281-21/+15
| | | | | | | | | | | Currently there's a large amount of CMake logic duplication for compiling sanitizer tests. If we add more sanitizers, the duplication will get even worse. This change factors out common compilation commands into a macro available to all sanitizers. llvm-svn: 309405
* Support libc++abi in addition to libstdc++Petr Hosek2017-07-281-1/+2
| | | | | | | | | | | This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 llvm-svn: 309362
* Support compiler-rt builtinsPetr Hosek2017-07-281-2/+3
| | | | | | | | | This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 llvm-svn: 309361
* [sanitizers] Sanitizer tests CMake clean up: try #2George Karpenkov2017-07-281-30/+4
| | | | | | | | | | | | | | | | | 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
* Revert "[sanitizers] Sanitizer tests CMake clean up"George Karpenkov2017-07-271-4/+30
| | | | | | | | 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-30/+4
| | | | | | | | | | | | | | | | | 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
* Revert "[sanitizer] Support compiler-rt builtins"Petr Hosek2017-07-261-3/+2
| | | | | | This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. llvm-svn: 309083
* Revert "[sanitizer] Support libc++abi in addition to libstdc++"Petr Hosek2017-07-261-2/+1
| | | | | | This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c. llvm-svn: 309082
* [sanitizer] Support libc++abi in addition to libstdc++Petr Hosek2017-07-261-1/+2
| | | | | | | | | | | This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 llvm-svn: 309074
* [sanitizer] Support compiler-rt builtinsPetr Hosek2017-07-251-2/+3
| | | | | | | | | This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 llvm-svn: 309060
* [sanitizer_common] Move filesystem-related code out of sanitizer_common.ccVitaly Buka2017-07-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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 "[sanitizer_common] Move filesystem-related code out of ↵Vitaly Buka2017-07-201-3/+3
| | | | | | | | | | sanitizer_common.cc" Breaks Windows build. This reverts commit r308640. llvm-svn: 308648
* [sanitizer_common] Move filesystem-related code out of sanitizer_common.ccAlex Shlyapnikov2017-07-201-3/+3
| | | | | | | | | | | | | | | | | 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. Commiting for mcgrathr. Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35591 llvm-svn: 308640
* [asan] Move memcpy, memmove, memset code out of asan_interceptors.ccAlex Shlyapnikov2017-07-205-133/+182
| | | | | | | | | | | | | | | | This is a pure refactoring change. It simply moves all the code and macros related to defining the ASan interceptor versions of memcpy, memmove, and memset into a separate file. This makes it cleaner to disable all the other interceptor code while still using these three, for a port that defines these but not the other common interceptors. Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35590 llvm-svn: 308575
* Don't call exit() from atexit handlers on DarwinFrancis Ricci2017-07-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Calling exit() from an atexit handler is undefined behavior. On Linux, it's unavoidable, since we cannot intercept exit (_exit isn't called if a user program uses return instead of exit()), and I haven't seen it cause issues regardless. However, on Darwin, I have a fairly complex internal test that hangs roughly once in every 300 runs after leak reporting finishes, which is resolved with this patch, and is presumably due to the undefined behavior (since the Die() is the only thing that happens after the end of leak reporting). In addition, this is the way TSan works as well, where an atexit handler+Die() is used on Linux, and an _exit() interceptor is used on Darwin. I'm not sure if it's intentionally structured that way in TSan, since TSan sets up the atexit handler and the _exit() interceptor on both platforms, but I have observed that on Darwin, only the _exit() interceptor is used, and on Linux the atexit handler is used. There is some additional related discussion here: https://reviews.llvm.org/D35085 Reviewers: alekseyshl, kubamracek Subscribers: eugenis, vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D35513 llvm-svn: 308353
* [Sanitizers] ASan/MSan/LSan allocators set errno on failure.Alex Shlyapnikov2017-07-181-16/+11
| | | | | | | | | | | | | | | | | | | | | Summary: ASan/MSan/LSan allocators set errno on allocation failures according to malloc/calloc/etc. expected behavior. MSan allocator was refactored a bit to make its structure more similar with other allocators. Also switch Scudo allocator to the internal errno definitions. TSan allocator changes will follow. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35275 llvm-svn: 308344
* [asan] Remove recent asan tests which expect death in allocatorVitaly Buka2017-07-181-10/+0
| | | | | | | | These tests assume allocator_may_return_null=false If allocator_may_return_null=true, gtest would not be able to switch it. Tests needs to be re-implemented as lit tests. llvm-svn: 308254
* [Sanitizers] ASan and LSan allocator set errno on failure.Alex Shlyapnikov2017-07-142-17/+48
| | | | | | | | | | | | | | | | | | | Summary: Set proper errno code on alloction failures and change some implementations to satisfy their man-specified requirements: LSan: valloc and memalign ASan: pvalloc, memalign and posix_memalign Changing both allocators in one patch since LSan depends on ASan allocator in some configurations. Reviewers: vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35440 llvm-svn: 308064
* [asan] For iOS/AArch64, if the dynamic shadow doesn't fit, restrict the VM spaceKuba Mracek2017-07-125-9/+42
| | | | | | | | | | On iOS/AArch64, the address space is very limited and has a dynamic maximum address based on the configuration of the device. We're already using a dynamic shadow, and we find a large-enough "gap" in the VM where we place the shadow memory. In some cases and some device configuration, we might not be able to find a large-enough gap: E.g. if the main executable is linked against a large number of libraries that are not part of the system, these libraries can fragment the address space, and this happens before ASan starts initializing. This patch has a solution, where we have a "backup plan" when we cannot find a large-enough gap: We will restrict the address space (via MmapFixedNoAccess) to a limit, for which the shadow limit will fit. Differential Revision: https://reviews.llvm.org/D35098 llvm-svn: 307865
* Refactor MemoryMappingLayout::Next to use a single struct instead of output ↵Francis Ricci2017-07-112-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | parameters. NFC. Summary: This is the first in a series of patches to refactor sanitizer_procmaps to allow MachO section information to be exposed on darwin. In addition, grouping all segment information in a single struct is cleaner than passing it through a large set of output parameters, and avoids the need for annotations of NULL parameters for unneeded information. The filename string is optional and must be managed and supplied by the calling function. This is to allow the MemoryMappedSegment struct to be stored on the stack without causing overly large stack sizes. Reviewers: alekseyshl, kubamracek, glider Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D35135 llvm-svn: 307688
* [asan] Fix asan_device_setup --use-su mode on Android 7.x.Evgeniy Stepanov2017-07-111-1/+1
| | | | | | | mount command does not accept -o remount,rw flag on some versions of Android. mount -o rw,remount works everywhere. llvm-svn: 307685
OpenPOWER on IntegriCloud