summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-26Skip two more ioctl interceptors for NetBSDKamil Rytarowski
Don't intercept: - HFSC_IF_ATTACH - HFSC_MOD_CLASS These operations conflict on NetBSD 32-bit with: - PRIQ_IF_ATTACH - PRIQ_MOD_CLASS Sponsored by <The NetBSD Foundation> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326084 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-24[ubsan-minimal] Fix the ubsan_minimal debug build (COMPILER_RT_DEBUG=1) on ↵Dan Liew
macOS. `ubsan_minimal` makes use of the `_sanitizer::atomic_load` function. This function uses the `DCHECK` macro which in debug builds will use the `_sanitizer::CheckFailed` function. This function is part of `sanitizer_common` but `ubsan_minimal` doesn't use this so the implementation is missing which leads to link failures on macOS when trying to link `libclang_rt.ubsan_minimal_osx_dynamic.dylib`. This is in contrast to the BFD linker on Linux which doesn't seem to care about the missing symbol. A basic implementation of `_sanitizer::CheckFailed` has been added to the `ubsan_minimal` debug build to avoid the link error. The implementation could definitely be improved but I don't know which functions can be used in this context so I decided to restrict myself to functions only being used in `ubsan_minimal` already. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326032 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-24[cfi] Lazy initialization of CFI interceptorsVitaly Buka
Summary: Interceptors initialization may need to allocate memory. So if we initialize too early we can crash in non initialized allocator. Reviewers: pcc, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43669 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326025 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-24Correct ctype(3) functions with NLS on NetBSDKamil Rytarowski
Summary: The setlocale(3) function reloads the ctype(3) arrays from external files. This happens behind the scenes in the internals of libc (citrus library, runes functions etc). ctype(3) functions like isspace(3) can be provided with two variations on NetBSD: inlined or via a global symbol in libc: ``` #if defined(_NETBSD_SOURCE) && !defined(_CTYPE_NOINLINE) && \ !defined(__cplusplus) #include <sys/ctype_inline.h> #else #include <sys/ctype_bits.h> #endif ``` The in-lined versions are de-facto array lookup operations. ``` #define isspace(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_S)) ``` After setting setlocale(3) the ctype(3) arrays (_ctype_tab_, _toupper_tab_, _tolower_tab_) are reload behind the scenes and they are required to be marked as initialized. Set them initialized inside the common setlocale(3) interceptor. The arrays are of size of 257 elements: 0..255 + 1 (EOF). This corrects errors on NetBSD/amd64 in applications prebuilt with MSan. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, dvyukov, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42020 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326008 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-24[Sanitizers] Increase allocated chunk limit for LargeMmapAllocatorAlex Shlyapnikov
Summary: There are applications out there which allocate more than 1 << 18 large chunks of memory (those handled by LargeMmapAllocator, aka secondary allocator). For 64 bits, secondary allocator stores allocated chunks in a growing on demand region of memory, growing in blocks of 128K, up to 1 << 20 chunks total. Sanitizer internal allocator's secondary uses fixed size array storing up to 1 << 15 chunks (down to 256K from 2Mb of memory used for that array). Nothing is changed for 32 bits, chunks are still stored in the fixed size array (up to 1 << 15 chunks). Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43693 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326007 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-22[libFuzzer] Include TEMP_MAX_LEN in Fuzzer::PrintStats.Matt Morehouse
Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43597 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325817 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-22Try to fix the syntax in testKamil Rytarowski
Reported on a buildbot: Error in XFAIL list: couldn't parse text: '| arm || aarch64 || mips' in expression: 'freebsd | arm || aarch64 || mips' Add || in the place of | Fallout from D43382 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325751 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-22Remove empty filesKamil Rytarowski
Left over after D43382 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325744 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-22Xray instrumentation / enabling more testsKamil Rytarowski
Summary: The Unix subdirectory mostly allows only on Linux x86_64 but now we can target x86_64 arch in general. Patch by David CARLIER Reviewers: krytarowski, dberris, emaste Reviewed By: krytarowski, dberris, emaste Subscribers: emaste, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43382 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325743 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-21[sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externallyVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325720 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-21[hwasan] Fix inline instrumentation.Evgeniy Stepanov
This patch changes hwasan inline instrumentation: Fixes address untagging for shadow address calculation (use 0xFF instead of 0x00 for the top byte). Emits brk instruction instead of hlt for the kernel and user space. Use 0x900 instead of 0x100 for brk immediate (0x100 - 0x800 are unavailable in the kernel). Fixes and adds appropriate tests. Patch by Andrey Konovalov. Differential Revision: https://reviews.llvm.org/D43135 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325711 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-21Fix racy msan testMaxim Kuvyrkov
Summary: Child thread may finish before pthread_setname_np() and/or pthread_getname_np() had a chance to run, which causes these functions to fail with ENOENT (meaning /proc/self/task/[tid]/comm doesn't exist). Fix by stalling child thread on a mutex. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43548 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325703 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-21Msan, fixing DTLS_on_tls_get_addr signature empty implementationKamil Rytarowski
Summary: No supported oses normally compiled that code (or not for a long time) probably never caught it. Patch by: David CARLIER Reviewers: vitalybuka, krytarowski Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43502 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325664 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-20Add new interceptor: strmode(3)Kamil Rytarowski
Summary: strmode - convert inode status information into a symbolic string Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43485 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325588 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-20Add new interceptor: fgetln(3)Kamil Rytarowski
Summary: fgetln - get a line from a stream Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43482 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325587 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-20Stop intercepting forkpty(3) and openpty(3) on NetBSDKamil Rytarowski
Summary: forkpty(3) and openpty(3) are part of `-lutil` and we don't intend to reimplement this system library in sanitizers. Everybody using these functions will need to use a precompiled library against MSan or other desired sanitizer. Restrict these functions to Linux-only. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43490 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325585 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-17Recognize all NetBSD architectures in UBSanKamil Rytarowski
Summary: Use uniform accessors for Program Pointer, Stack Pointer and Frame Pointer. Remove CPU check in UBSan supported platforms and rely only on the OS type. This adds NetBSD support in GetPcSpBp() for: - ARM - ARM64 - HPPA - PowerPC/PowerPC64 - SPARC/SPARC64 - MIPS - DEC Alpha AXP - DEC VAX - M68K and M68010 - SH3 - IA64 - OR1K - RISCV Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, ro Reviewed By: vitalybuka Subscribers: aemerson, jyknight, sdardis, kubamracek, arichardson, llvm-commits, kristof.beyls, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43021 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325431 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-16Add initial XRay support for NetBSDKamil Rytarowski
Summary: Reuse the existing FreeBSD code as it is. Sponsored by <The NetBSD Foundation> Reviewers: dberris, rnk, vitalybuka Reviewed By: dberris Subscribers: mclow.lists, emaste, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43370 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325345 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-16Reintroduce FreeBSD support in test/xrayKamil Rytarowski
Tested by Douglas Yung. The original patch from D43278 has been reverted. New patch by myself. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325315 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-16Revert part of SVN r. 325240 in lit.cfgKamil Rytarowski
The original change broke a llvm-clang-lld-x86_64-debian setup. This change will be investigated and reintroduced in future. Original commit: "Add Xray instrumentation support to FreeBSD" https://reviews.llvm.org/D43278 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325309 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15[asan] Add "arm64" into the list of 64-bit architecturesKuba Mracek
It looks like get_bits_for_arch doesn't recognize "arm64" as a 64-bit architecture, and it actually matches the "arm" regexp, which marks it as 32-bit. Let's fix that by matching the 64-bit list first and addin "arm64" into the list. Differential Revision: https://reviews.llvm.org/D43155 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325300 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15[TSan] Fix static TLS boundaries calculations in __tls_get_addr interceptor.Alex Shlyapnikov
Summary: DTLS_on_tls_get_addr expects (tls_addr + tls_size) as the last parameter, static_tls_end. Reviewers: dvyukov Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43325 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325276 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Try to unbreak Darwin after XRay/FreeBSD commitKamil Rytarowski
Add a fallback definition of getTSCFrequency(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325249 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Implement a large part of NetBSD syscalls of netbsd_syscall_hooks.hKamil Rytarowski
This is a follow up of: r325206 - Add NetBSD syscall hooks skeleton in sanitizers Sponsored by <The NetBSD Foundation> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325248 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Enable test/asan for NetBSDKamil Rytarowski
Sponsored by <The NetBSD Foundation> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325246 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Enable syscall-specific functions in TSan/NetBSDKamil Rytarowski
NetBSD ships now with netbsd_syscall_hooks.h and requires support for TSan specific features to be enabled. This is follow up of: D42048: Add NetBSD syscall hooks skeleton in sanitizers Sponsored by <The NetBSD Foundation> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325245 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Add Xray instrumentation support to FreeBSDKamil Rytarowski
Summary: - Enabling the build. - Using assembly for the cpuid parts. - Using thr_self FreeBSD call to get the thread id Patch by: David CARLIER Reviewers: dberris, rnk, krytarowski Reviewed By: dberris, krytarowski Subscribers: emaste, stevecheckoway, nglevin, srhines, kubamracek, dberris, mgorny, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43278 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325240 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Teach sanitizer about NetBSD specific ioctl(2) callsKamil Rytarowski
Summary: Introduce handling of 1200 NetBSD specific ioctl(2) calls. Over 100 operations are disabled as unavailable or conflicting with the existing ones (the same operation number). Add a script that generates the rules to detect ioctls on NetBSD. The generate_netbsd_ioctls.awk script has been written in NetBSD awk(1) (patched nawk) and is compatible with gawk. Generate lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc with the awk(1) script. Update sanitizer_platform_limits_netbsd accordingly to add the needed definitions. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, dvyukov Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41636 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325212 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Prevent recursive MSan interceptors in strftime(3) like functionsKamil Rytarowski
Summary: This corrects intercepting this call on NetBSD without false positives. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42883 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325208 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Prevent recursive MSan interceptors in fgets(3)Kamil Rytarowski
Summary: This corrects intercepting this call on NetBSD without false positives. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42884 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325207 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Add NetBSD syscall hooks skeleton in sanitizersKamil Rytarowski
Summary: Implement the skeleton of NetBSD syscall hooks for use with sanitizers. Add a script that generates the rules to handle syscalls on NetBSD: generate_netbsd_syscalls.awk. It has been written in NetBSD awk(1) (patched nawk) and is compatible with gawk. Generate lib/sanitizer_common/sanitizer_platform_limits_netbsd.h that is a public header for applications, and included as: <sanitizer_common/sanitizer_platform_limits_netbsd.h>. Generate sanitizer_syscalls_netbsd.inc that defines all the syscall rules for NetBSD. This file is modeled after the Linux specific file: sanitizer_common_syscalls.inc. Start recognizing NetBSD syscalls with existing sanitizers: ASan, ESan, HWASan, TSan, MSan. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, dvyukov, eugenis Reviewed By: vitalybuka Subscribers: hintonda, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42048 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325206 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15Add new interceptor: lstat(2)Kamil Rytarowski
Summary: lstat - get file status Use it on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D42909 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325199 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15[sanitizer] Fix flakiness in the testsVitaly Buka
Seems tests fails if link already exists. Also removed duplicated part of tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325194 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-13[libFuzzer] Set -experimental_len_control=1000 as default.Matt Morehouse
Summary: Experiments using https://github.com/google/fuzzer-test-suite/tree/master/engine-comparison show a significant increase in coverage and reduction in corpus size with this option enabled. Addresses https://llvm.org/pr36371. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42932 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325050 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-13[sanitizer] Implement GetRSS on WindowsKostya Kortchinsky
Summary: Pretty straightforward, returning the `WorkingSetSize` of a `PROCESS_MEMORY_COUNTERS` structure. AFAIU, `GetProcessMemoryInfo` is in `kernel32.lib` for Windows 7 and above. Support for earlier Windows versions would require `psapi.lib`, but I don't think those are supported by ASan? Reviewers: alekseyshl, rnk, vitalybuka Reviewed By: vitalybuka Subscribers: vitalybuka, kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42822 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325020 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-12[sanitizer] Size class map & local cache improvementsKostya Kortchinsky
Summary: - Reland rL324263, this time allowing for a compile-time decision as to whether or not use the 32-bit division. A single test is using a class map covering a maximum size greater than 4GB, this can be checked via the template parameters, and allows SizeClassAllocator64PopulateFreeListOOM to pass; - `MaxCachedHint` is always called on a class id for which we have already computed the size, but we still recompute `Size(class_id)`. Change the prototype of the function to work on sizes instead of class ids. This also allows us to get rid of the `kBatchClassID` special case. Update the callers accordingly; - `InitCache` and `Drain` will start iterating at index 1: index 0 contents are unused and can safely be left to be 0. Plus we do not pay the cost of going through an `UNLIKELY` in `MaxCachedHint`, and touching memory that is otherwise not used; - `const` some variables in the areas modified; - Remove an spurious extra line at the end of a file. Reviewers: alekseyshl, tl0gic, dberris Reviewed By: alekseyshl, dberris Subscribers: dberris, kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43088 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324906 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-11Revert r324847, there's bot failures.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324849 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-11[sanitizer] Implement NanoTime() on DarwinKuba Mracek
Currently NanoTime() on Darwin is unimplemented and always returns 0. Looks like there's quite a few things broken because of that (TSan periodic memory flush, ASan allocator releasing pages back to the OS). Let's fix that. Differential Revision: https://reviews.llvm.org/D40665 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324847 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-11[compiler-rt] Replace forkpty with posix_spawnKuba Mracek
On Darwin, we currently use forkpty to communicate with the "atos" symbolizer. There are several problems that fork or forkpty has, e.g. that after fork, interceptors are still active and this sometimes causes crashes or hangs. This is especially problematic for TSan, which uses interceptors for OS-provided locks and mutexes, and even Libc functions use those. This patch replaces forkpty with posix_spawn. Since posix_spawn doesn't fork (at least on Darwin), the interceptors are not a problem. Additionally, this also fixes a latent threading problem with ptsname (it's unsafe to use this function in multithreaded programs). Yet another benefit is that we'll handle post-fork failures (e.g. sandbox disallows "exec") gracefully now. Differential Revision: https://reviews.llvm.org/D40032 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324846 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-10Correct a typo in tsan_pthread_setname_np in the FreeBSD codeKamil Rytarowski
Noted by David CARLIER. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324811 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-10Mark the textdomain.cc test as unsupported on BSDsKamil Rytarowski
textdomain is a part of -lintl on BSDs. In GLIBC it's in libc. We assume that -lintl will need to be rebuilt with sanitizers in order to sanitize programs using its features. This is a proper continuation of D41013. The original patch has been reverted (adding -lintl). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324810 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-10[XRay] Rename Buffer.Buffer to Buffer.DataDean Michael Berris
Summary: some compiler (msvc) treats Buffer.Buffer as constructor and refuse to compile. NFC Authored by comicfans44. Reviewers: rnk, dberris Reviewed By: dberris Subscribers: llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40346 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324807 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-08[scudo] Allow options to be defined at compile timeKostya Kortchinsky
Summary: Allow for options to be defined at compile time, like is already the case for other sanitizers, via `SCUDO_DEFAULT_OPTIONS`. Reviewers: alekseyshl, dberris Reviewed By: alekseyshl, dberris Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42980 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324620 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-08[builtins] Workaround for infinite recursion in c?zdi2Jonas Devlieghere
gcc resolves `__builtin_c?z` to `__c?zdi2` which leads to infinite recursion. This problem has been observed for sparc64, mips64 and riscv. Presumably this happens whenever an arch without dedicated bit counting instructions is targeted. This patch provides a workaround. Differential revision: https://reviews.llvm.org/D42902 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324593 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-08Update test counter_promo_nest.c to meet llvm changeSerguei Katkov
The test expects to see the pattern "load add store" twice in a row. However the test contains actually several instances of this pattern. Currently the first pattern appears in the output twice. But after LLVM change https://reviews.llvm.org/D42691 some addtional modification is done and one of another pattern has been hoisted in function entry block. As a result we have another order of meeting this pattern. The test is updated to meet this change. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324571 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-08Add space inside the regular expression.Rafael Espindola
This should now pass on both ppc and x86. Sorry about the noise. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324556 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-08Remove extra space.Rafael Espindola
Should fix the ppc bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324548 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07Update for llvm change.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324541 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07[asan] Fix filename size on linux platforms.Yvan Roux
This is a a fix for: https://bugs.llvm.org/show_bug.cgi?id=35996 Use filename limits from system headers to be synchronized with what LD_PRELOAD can handle. Differential Revision: https://reviews.llvm.org/D42900 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324496 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07Correct a bug in GetArgsAndEnv() for NetBSDKamil Rytarowski
Fix setting envp. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@324481 91177308-0d34-0410-b5e6-96231b3b80d8