Commit Graph

9005 Commits

Author SHA1 Message Date
Kamil Rytarowski 4ad374ea76 Add NetBSD support in asan_linux.cc
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
2017-08-10 18:51:51 +00:00
Kamil Rytarowski fbd51b954d Enable SafeStack on NetBSD
Summary:
make check-safestack:

-- Testing: 8 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 0.44s
  Expected Passes    : 7
  Unsupported Tests  : 1

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, kcc, fjricci, filcab

Reviewed By: vitalybuka

Subscribers: mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36542

llvm-svn: 310646
2017-08-10 18:40:09 +00:00
Alexander Potapenko 925c0741ab [sanitizer_common] Update sanitizers w.r.t. the new comparisons 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
2017-08-10 14:22:57 +00:00
Oleg Ranevskyy a02114b651 [compiler-rt][ARM] Fix filtering of ARM targets
Summary:
Similarly to i686, the ARM build target has multiple names, such as armhf, armv7 and so on. Currently we get duplicated symbol definitions for these targets while compiling the library. Each duplicated definition has its generic version from `lib/builtins` and an ARM-specialized version from `lib/builtins/arm`. 

This patch fixes filtering for ARM to ignore the generic definitions if they have their ARM specializations.

Reviewers: compnerd

Reviewed By: compnerd

Subscribers: aemerson, dberris, llvm-commits, mgorny, asl, kristof.beyls

Differential Revision: https://reviews.llvm.org/D35336

llvm-svn: 310588
2017-08-10 13:27:29 +00:00
Vitaly Buka 7030354744 [asan] Refactor thread creation bookkeeping
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
2017-08-09 00:38:57 +00:00
Vitaly Buka 83832fe7db [asan] Complete the Fuchsia port
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
2017-08-09 00:21:45 +00:00
Kamil Rytarowski e5a9d9f17c Try to appease compiler and break multiline comment.
llvm-svn: 310428
2017-08-08 23:31:21 +00:00
Reid Kleckner c3fc3bc5af [winasan] Fix hotpatching ntdll!strcpy for Win10 creators edition
The 9 byte nop is a suffix of the 10 byte nop, and we need at most 6
bytes.

ntdll's version of strcpy is written in assembly and is very clever.
strcat tail calls strcpy but with a slightly different arrangement of
argument registers at an alternate entry point. It looks like this:

  ntdll!strcpy:
  00007ffd`64e8a7a0 4c8bd9          mov     r11,rcx
  ntdll!__entry_from_strcat_in_strcpy:
  00007ffd`64e8a7a3 482bca          sub     rcx,rdx
  00007ffd`64e8a7a6 f6c207          test    dl,7

If we overwrite more than two bytes in our interceptor, that label will
no longer be a valid instruction boundary.

By recognizing the 9 byte nop, we use the two byte backwards branch to
start our trampoline, avoiding this issue.

Fixes https://github.com/google/sanitizers/issues/829

Patch by David Major

llvm-svn: 310419
2017-08-08 21:18:36 +00:00
Kamil Rytarowski a1e4edd155 Add NetBSD support in asan_malloc_linux.cc
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
2017-08-08 20:52:54 +00:00
Kamil Rytarowski c5c9ba1ca9 Add NetBSD support in asan_symbolize.py
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
2017-08-08 20:50:07 +00:00
Kamil Rytarowski c9bcc8dc9d Enable ubsan on NetBSD
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, vitalybuka, kcc, filcab, fjricci

Reviewed By: fjricci

Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36483

llvm-svn: 310412
2017-08-08 20:49:20 +00:00
Kamil Rytarowski c187cabe41 Reuse sanitizer_linux for NetBSD
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
2017-08-08 20:36:10 +00:00
Kamil Rytarowski f5266f03a8 Add NetBSD support in asan_interceptors.cc
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
2017-08-08 19:09:48 +00:00
Kamil Rytarowski 367c63dc11 NetBSD compatibility nit in asan_test_utils.h
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
2017-08-08 18:16:35 +00:00
Kamil Rytarowski 741d21f958 Enable COMPILER_RT_HAS_SANITIZER_COMMON on NetBSD
Summary:
Temporarily keep disabled COMPILER_RT_HAS_ASAN 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, filcab, kcc, vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36312

llvm-svn: 310370
2017-08-08 15:25:26 +00:00
Kamil Rytarowski 70a3511bd5 Reuse interception_linux for NetBSD
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

Reviewed By: vitalybuka

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36321

llvm-svn: 310351
2017-08-08 12:10:08 +00:00
Kamil Rytarowski e528bd2193 Define OFF_T as 64-bit integer on NetBSD
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
2017-08-08 11:40:15 +00:00
Vitaly Buka 4bc6c466b8 [asan] Restore dead-code-elimination optimization for Fuchsia
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
2017-08-08 01:01:59 +00:00
Kamil Rytarowski 1b39be7867 Fix asan_test.cc build on NetBSD
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
2017-08-07 23:38:14 +00:00
Kamil Rytarowski 123f62d515 Add NetBSD support in asan_stack.h
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
2017-08-07 23:34:45 +00:00
Kuba Mracek 507b1e280c [tsan] Fix format string in WriteMemoryProfile
The current format string is broken and fails to parse.

Differential Revision: https://reviews.llvm.org/D36192

llvm-svn: 310276
2017-08-07 18:12:59 +00:00
Kuba Mracek ac102b6977 [asan] Make dump_registers.cc more stable
Differential Revision: https://reviews.llvm.org/D36231

llvm-svn: 310273
2017-08-07 18:12:01 +00:00
Kuba Mracek b0d208a0ab [sanitizer] Remove use of task_for_pid from sanitizer_stoptheworld_mac.cc
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
2017-08-07 18:07:20 +00:00
Kamil Rytarowski dc213718db Add NetBSD support in sanitizer_test_utils.h
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
2017-08-07 10:59:44 +00:00
Kamil Rytarowski b0ca299cfe Add NetBSD support in asan_errors.cc
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
2017-08-07 10:58:48 +00:00
Kamil Rytarowski 767960bf86 Add NetBSD support in asan_interceptors.h
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
2017-08-07 10:57:58 +00:00
Vitaly Buka bdd455f0d5 [asan] Return sizeof missed by r309914
llvm-svn: 310244
2017-08-07 09:08:44 +00:00
Kamil Rytarowski c827f014c3 Add NetBSD support in sanitizer_errno.h
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
2017-08-05 18:10:51 +00:00
Kamil Rytarowski 4c69d68ea0 Add NetBSD support in sanitizer_unwind_linux_libcdep.cc
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
2017-08-05 13:36:49 +00:00
Kamil Rytarowski 886b30c4ff Add NetBSD support in sanitizer_linux_libcdep.cc
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
2017-08-04 22:32:46 +00:00
Kamil Rytarowski d1dc704c87 Add NetBSD support in interception.h
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, filcab, vitalybuka

Reviewed By: vitalybuka

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36323

llvm-svn: 310140
2017-08-04 22:27:01 +00:00
Kamil Rytarowski 6c68c2e2c5 Add NetBSD support in sanitizer_syscall_generic.inc
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
2017-08-04 22:23:52 +00:00
Kostya Kortchinsky a53de0bf0f [asan] Fix unsupported test on Android
Summary:
`pvalloc` appears to not be available on Android. Mark the failing test as
unsupported on that platform.

Reviewers: alekseyshl, vitalybuka

Reviewed By: alekseyshl, vitalybuka

Subscribers: srhines, kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D36339

llvm-svn: 310133
2017-08-04 21:26:20 +00:00
Kostya Kortchinsky d7d1681a0e [asan] Check for pvalloc overlow
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
2017-08-04 20:28:59 +00:00
Kamil Rytarowski fcf8e5e345 Add NetBSD support in sanitizer_procmaps_freebsd.cc
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
2017-08-04 20:17:24 +00:00
Vlad Tsyrklevich 8d7755e7aa CFI: Move STL allocator blacklist to clang
Summary:
The regular expression to match STL allocators can't easily account for
C++ mangling compression and fails to match some valid instances of STL
allocators. Perform this logic in clang instead.

Motivated by crbug.com/751385.

Reviewers: pcc, kcc, llvm-commits

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D36291

llvm-svn: 310109
2017-08-04 20:04:01 +00:00
Alex Shlyapnikov d053135d89 [compiler-rt] Check for empty buffer in Addr2LineProcess::ReadFromSymbolizer
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
2017-08-04 18:39:36 +00:00
Benjamin Kramer 7fba72e97b [msan] Switch the pvalloc overflow test to a lit test
The test was not passing on targets where allocator_may_return_null
defaults to true. Change the test to a lit test so that we can test both
situations.

Patch by Kostya Kortchinsky!

Differential Revision: https://reviews.llvm.org/D36302

llvm-svn: 310033
2017-08-04 07:32:10 +00:00
Vedant Kumar 696e3847dd coverage: Update tests to reflect changes from r310012
llvm-svn: 310015
2017-08-04 01:22:19 +00:00
Martin Storsjo becd2ef602 [builtins] Use Interlocked* intrinsics for atomics on MSVC
Tested on MSVC 2013, 2015 and 2017 targeting X86, X64 and ARM.

This fixes building emutls.c for Windows for ARM (both with clang
which don't need these atomics fallbacks at all, but just failed
due to the immintrin.h include before, and with MSVC).

Differential Revision: https://reviews.llvm.org/D36071

llvm-svn: 309974
2017-08-03 19:04:28 +00:00
Sterling Augustine 3eaab9620d These tests use 80-bit long doubles, which are x86 only. Mark them so.
This avoids having each new target need to mark them as unsupported.

llvm-svn: 309973
2017-08-03 18:56:54 +00:00
Vitaly Buka 993bbbf19e [asan] Allocator support for Fuchsia
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
2017-08-03 02:22:11 +00:00
Dean Michael Berris 449fdf816e [XRay][compiler-rt] Allow for building the XRay runtime without PREINIT initialization.
Summary:
Define a build-time configuration option for the XRay runtime to
determine whether the archive will add an entry to the `.preinit_array`
section of the binary. We also allow for initializing the XRay data
structures with an explicit call to __xray_init(). This allows us to
give users the capability to initialize the XRay data structures on
demand.

This can allow us to start porting XRay to platforms where
`.preinit_array` isn't a supported section. It also allows us to limit
the effects of XRay in the initialization sequence for applications that
are sensitive to this kind of interference (i.e. large binaries) or
those that want to package XRay control in libraries.

Future changes should allow us to build two different library archives
for the XRay runtime, and allow clang users to determine which version
to link.

Reviewers: dblaikie, kpw, pelikan

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D36080

llvm-svn: 309909
2017-08-03 00:58:45 +00:00
Kostya Kortchinsky 0357e8de3b [tsan] Check for pvalloc overlow
Summary:
`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 TSan's pvalloc implementation.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits, kubamracek

Differential Revision: https://reviews.llvm.org/D36245

llvm-svn: 309897
2017-08-02 22:47:54 +00:00
Sterling Augustine a0213850e5 Use a more standard method to mark these tests as unsupported on powerpc64.
llvm-svn: 309892
2017-08-02 21:52:23 +00:00
Kostya Kortchinsky 94380ed406 [msan] Check for pvalloc overflow
Summary:
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 MSan's pvalloc implementation.

This time I made sure I was actually running (and writing) the correct tests,
and that they are passing...

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D36164

llvm-svn: 309883
2017-08-02 20:32:12 +00:00
Kostya Serebryany 1ca948a2b4 Add new ASAN_OPTION: sleep_after_init.
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
2017-08-02 18:48:45 +00:00
Sterling Augustine f67036b62c This ppc64 implementation of clear_cache works for both big and little endian.
llvm-svn: 309848
2017-08-02 18:13:59 +00:00
Vedant Kumar 8adb8d5d0d [ubsan] Test -fsanitize=vptr without -fsanitize=null
This reverts commit r309042, thereby adding a test for -fsanitize=vptr
functionality without -fsanitize=null. It also removes -fsanitize=null
from another -fsanitize=vptr test.

llvm-svn: 309847
2017-08-02 18:10:36 +00:00
Vitaly Buka 411533009d [asan] Interceptors for Fuchsia
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
2017-08-02 07:59:30 +00:00