Commit Graph

9907 Commits

Author SHA1 Message Date
Kamil Rytarowski 2f358738b8 OpenBSD sanitizer common, define RLIMIT_AS constant
Summary: define RLIMIT_AS constant until it s defined in the future

Patch by: David Carlier

Reviewers: krytarowski, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, #sanitizers

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

llvm-svn: 326768
2018-03-06 08:24:16 +00:00
Petr Hosek 5e3b41d573 [sanitizer] Fix the return type for GetTid in Fuchsia implementation
This is triggering "functions that differ only in their return type
cannot be overloaded" error.

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

llvm-svn: 326759
2018-03-06 02:01:32 +00:00
Kamil Rytarowski a51ccfd49f Remove more references to ptrace_pt_{g,s}et_sigmask
These operations are now obsolete on NetBSD and will be removed.

No functional change for other OSes.

Sponsored by <The NetBSD Foundation>

llvm-svn: 326663
2018-03-03 18:41:38 +00:00
Kamil Rytarowski fc44eb07a7 Fix NetBSD 32-bit build
Replace 'defined(SANITIZER_OPENBSD)' with appropriate 'SANITIZER_OPENBSD'.

This is a fallout from adding OpenBSD partial support.

llvm-svn: 326662
2018-03-03 18:38:20 +00:00
Kamil Rytarowski 9f2a4e212c Remove obsolete ptrace(2) operations from NetBSD
PT_SET_SIGMASK and PT_GET_SIGMASK will be removed from NetBSD
without backward compat (it shortlived in a development branch).

Sponsored by <The NetBSD Foundation>

llvm-svn: 326657
2018-03-03 16:21:13 +00:00
Kamil Rytarowski 980d0f8919 Revert D44035
Broken syntax.

llvm-svn: 326655
2018-03-03 14:50:36 +00:00
Kamil Rytarowski baddcfd76a Hotfix for D44035
Try to fix the syntax.

llvm-svn: 326654
2018-03-03 14:31:06 +00:00
Kamil Rytarowski 13e0063e74 Support OpenBSD in common interceptors
Summary:
Extract  INIT_PTHREAD_ATTR_GET_SCHED from INIT_PTHREAD_ATTR_GET,
as the former is not supported on OpenBSD.

Supported interceptors
getdetachstate, getguardsize, getscope, getstacksize, getgrouplist and getstack
Unsupported
getschedparam, getgroupmembership and getschedpolicy

Patch by David CARLIER

Reviewers: krytarowski, vitalybuka

Reviewed By: vitalybuka

Subscribers: fedor.sergeev, srhines, kubamracek, mgorny, llvm-commits, #sanitizers

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

llvm-svn: 326653
2018-03-03 14:13:08 +00:00
Kamil Rytarowski 310cd2509c OpenBSD UBsan support enabling SANITIZER_OPENBSD widely
Summary: Adding OpenBSD platform

Patch by: David CARLIER

Reviewers: krytarowski, vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, kubamracek, fedor.sergeev, llvm-commits, #sanitizers

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

llvm-svn: 326651
2018-03-03 12:12:03 +00:00
Kamil Rytarowski c18102fed5 OpenBSD UBsan support / common
Summary:
Sanitizer common, enable OpenBSD platform.
- Enable common interceptors as possible and create few distinct ones.
- Create necessary sanitizer_struct types.

Patch by: David CARLIER

Reviewers: krytarowski, vitalybuka, visa, kettenis

Reviewed By: vitalybuka

Subscribers: emaste, srhines, kubamracek, mgorny, fedor.sergeev, llvm-commits, #sanitizers

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

llvm-svn: 326650
2018-03-03 12:04:40 +00:00
Kamil Rytarowski 8ec9586851 [msan] Restrict -ftls-model=initial-exec to FreeBSD
Noted by <eugenis> in D43613

llvm-svn: 326649
2018-03-03 12:00:12 +00:00
Kamil Rytarowski d14a955c24 Sanitiser common, using u64 type for GetTid on posix systems
Summary: Moving from ptr to u64 for GetTid posix implementation.
[FreeBSD] Moving from pthread_self to thr_self more appropriate to get thread ID.

Patch by: David CARLIER

Reviewers: krytarowski, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, #sanitizers

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

llvm-svn: 326647
2018-03-03 11:50:58 +00:00
Kamil Rytarowski 0d58e0f613 OpenBSD UBsan support, cmake part
Summary:
On OpenBSD no multi arch support
Enabling only UBsan and disabling Asan.

Patch by: David CARLIER

Reviewers: krytarowski, vitalybuka

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, fedor.sergeev, llvm-commits, #sanitizers

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

llvm-svn: 326646
2018-03-03 11:48:54 +00:00
Kamil Rytarowski 3d7fbb052f Adding Msan support to FreeBSD
Summary:
Enabling the memory sanitizer support for FreeBSD, most of unit tests are compatible.
- Adding fstat and stressor_r interceptors.
- Updating the struct link_map access since most likely the struct Obj_Entry had been updated since.
- Disabling few unit tests until further work is needed (or we can assume it can work in real world code).

Patch by: David CARLIER

Reviewers: vitalybuka, krytarowski

Reviewed By: vitalybuka

Subscribers: eugenis, dim, srhines, emaste, kubamracek, mgorny, fedor.sergeev, hintonda, llvm-commits, #sanitizers

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

llvm-svn: 326644
2018-03-03 11:43:11 +00:00
Kamil Rytarowski 7e55245213 OpenBSD Ubsan support / interception
Summary: Interception, enabling OpenBSD platform

Patch by: David CARLIER

Reviewers: krytarowski, vitalybuka, visa

Reviewed By: vitalybuka

Subscribers: srhines, fedor.sergeev, llvm-commits, #sanitizers

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

llvm-svn: 326544
2018-03-02 07:32:30 +00:00
Kamil Rytarowski 4410bbc9ed OpenBSD UBsan support / ubsan part
Summary: UBsan, enable OpenBSD platform

Patch by: David CARLIER

Reviewers: krytarowski, kettenis, visa, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, fedor.sergeev, llvm-commits, #sanitizers

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

llvm-svn: 326543
2018-03-02 07:30:22 +00:00
Shiva Chen 77f19a384c [PATCH] [compiler-rt, RISCV] Support builtins for RISC-V
Summary:
Support builtins for RISC-V, RV32 and RV64.

Reviewers: asb, apazos, mgrang

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

llvm-svn: 326420
2018-03-01 07:47:27 +00:00
Vedant Kumar a4c56923d2 [profile] Test the exported symbol set for empty programs
Programs without any code in them should export the exact same set of
symbols as programs with code, at least on Darwin. This is done to make
text-based API verification possible for certain Darwin frameworks.

llvm-svn: 326351
2018-02-28 19:00:16 +00:00
Mandeep Singh Grang d34e876185 [RISCV] Force enable int128 for compiling long double routines
Summary:
For RISCV32, we must force enable int128 for compiling long double routines using the flag -fforce-enable-int128.

Related clang patch: https://reviews.llvm.org/D43105

Reviewers: asb, kito-cheng, apazos, compnerd, howard.hinnant

Reviewed By: kito-cheng

Subscribers: shiva0217, efriedma, mgorny, hintonda, llvm-commits, #sanitizers

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

llvm-svn: 326346
2018-02-28 18:24:09 +00:00
Kamil Rytarowski ad4632e07a Disable ASan exceptions on NetBSD
This is a workarond for the fallout from D42644:
[asan] Intercept std::rethrow_exception indirectly.

Reported problem on NetBSD/amd64:

$ sh ./projects/compiler-rt/test/sanitizer_common/asan-i386-NetBSD/NetBSD/Output/ttyent.cc.script
/usr/lib/i386/libgcc.a(unwind-dw2.o): In function `_Unwind_RaiseException':
unwind-dw2.c:(.text+0x1b41): multiple definition of `_Unwind_RaiseException'
/public/llvm-build/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a(asan_interceptors.cc.o):/public/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:337: first defined here
clang-7.0: error: linker command failed with exit code 1 (use -v to see invocation)

llvm-svn: 326216
2018-02-27 18:05:49 +00:00
Kostya Kortchinsky beeea6227b [scudo] Introduce Chunk::getHeaderSize
Summary:
Instead of using `AlignedChunkHeaderSize`, introduce a `constexpr` function
`getHeaderSize` in the `Chunk` namespace. Switch `RoundUpTo` to a `constexpr`
as well (so we can use it in `constexpr` declarations). Mark a few variables
in the areas touched as `const`.

Overall this has no functional change, and is mostly to make things a bit more
consistent.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: delcypher, #sanitizers, llvm-commits

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

llvm-svn: 326206
2018-02-27 16:14:49 +00:00
Kamil Rytarowski 8992eddbdf Add new interceptors: getnetent(3) family
Summary:
getnetent, getnetbyaddr, getnetbyname - get network entry

Reuse them on NetBSD.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: llvm-commits, kubamracek, #sanitizers

Tags: #sanitizers

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

llvm-svn: 326163
2018-02-27 02:33:30 +00:00
Kamil Rytarowski fc67e66b57 Add new interceptors: getprotoent(3) family
Summary:
getprotoent, getprotobynumber, getprotobyname - get protocol entry

Reuse them on NetBSD.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, #sanitizers

Tags: #sanitizers

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

llvm-svn: 326162
2018-02-27 02:32:04 +00:00
Kamil Rytarowski 31c34bfe8f Add new interceptors: getttyent(3) family
Summary:
getttyent, getttynam, setttyentpath - get ttys file entry

Reuse them on NetBSD.

Sponsored by <The NetBSD Foundation>

Reviewers: vitalybuka, joerg

Reviewed By: vitalybuka

Subscribers: llvm-commits, kubamracek, #sanitizers

Tags: #sanitizers

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

llvm-svn: 326161
2018-02-27 02:30:16 +00:00
Vitaly Buka e9d957de8d [asan] Enable ASAN_INTERCEPT___CXA_THROW for x86 Android
llvm-svn: 326160
2018-02-27 02:14:06 +00:00
Kuba Mracek d2af423bbe Fix build for iOS/ARM ("__Unwind_RaiseException" is not available for armv7).
llvm-svn: 326150
2018-02-26 23:39:04 +00:00
Vitaly Buka 78577341c4 [asan] Fix build for Android
llvm-svn: 326149
2018-02-26 23:23:07 +00:00
Volodymyr Sapsai 9ef00ed487 Fix which Darwin versions have ObjC runtime with full subscripting support.
Update min deployment target in some tests so that they don't try
to link against libarclite and don't fail when it's not available.

rdar://problem/29253617

Reviewers: vsk, kubamracek

Reviewed By: vsk

Subscribers: jkorous-apple, cfe-commits

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

llvm-svn: 326143
2018-02-26 23:04:57 +00:00
Reid Kleckner 54af3e7e14 Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver."
Reverts r326116 and re-lands r326113 with a fix to ASan so that it
enables column info in its test suite.

llvm-svn: 326141
2018-02-26 22:55:33 +00:00
Vitaly Buka 781ef03e10 [asan] Intercept std::rethrow_exception indirectly
Summary:
Fixes Bug 32434
See https://bugs.llvm.org/show_bug.cgi?id=32434

Short summary:
std::rethrow_exception does not use __cxa_throw to rethrow the exception, so if
it is called from uninstrumented code, it will leave the stack poisoned. This
can lead to false positives.

Long description:

For functions which don't return normally (e.g. via exceptions), asan needs to
unpoison the entire stack. It is not known before a call to such a function
where execution will continue, some function which don't contain cleanup code
like destructors might be skipped. After stack unwinding, execution might
continue in uninstrumented code.

If the stack has been poisoned before such a function is called, but the stack
is unwound during the unconventional return, then zombie redzones (entries) for
no longer existing stack variables can remain in the shadow memory. Normally,
this is avoided by asan generating a call to asan_handle_no_return before all
functions marked as [[noreturn]]. This asan_handle_no_return unpoisons the
entire stack. Since these [[noreturn]] functions can be called from
uninstrumented code, asan also introduces interceptor functions which call
asan_handle_no_return before running the original [[noreturn]] function;
for example, cxa_throw is intercepted.

If a [[noreturn]] function is called from uninstrumented code (so the stack is
left poisoned) and additionally, execution continues in uninstrumented code, new
stack variables might be introduced and overlap with the stack variables
which have been removed during stack unwinding. Since the redzones are not
cleared nor overwritten by uninstrumented code, they remain but now contain
invalid data.

Now, if the redzones are checked against the new stack variables, false
positive reports can occur. This can happen for example by the uninstrumented
code calling an intercepted function such as memcpy, or an instrumented
function.

Intercepting std::rethrow_exception directly is not easily possible since it
depends on the C++ standard library implementation (e.g. libcxx vs libstdc++)
and the mangled name it produces for this function. As a rather simple
workaround, we're intercepting _Unwind_RaiseException for libstdc++. For
libcxxabi, we can intercept the ABI function __cxa_rethrow_primary_exception.

Patch by Robert Schneider.

Reviewers: kcc, eugenis, alekseyshl, vitalybuka

Reviewed By: vitalybuka

Subscribers: llvm-commits

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

llvm-svn: 326132
2018-02-26 21:40:19 +00:00
Kuba Mracek 473f3fbaf8 Fix-up for r326106: FindAvailableMemoryRange needs a nullptr as its 5th argument.
llvm-svn: 326111
2018-02-26 18:44:43 +00:00
Kuba Mracek 061f3589cc [asan] Be more careful and verbose when allocating dynamic shadow memory
FindAvailableMemoryRange can currently overwrite existing memory (by restricting the VM below addresses that are already used). This patch adds a check to make sure we don't restrict the VM space too much. We are also now more explicit about why the lookup failed and print out verbose values.

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

llvm-svn: 326106
2018-02-26 18:33:21 +00:00
Alex Shlyapnikov 4b30a4261f [MSan] Print current stack on CHECK violation
Summary:
Print current stack on CHECK violation to aid debugging and
match other sanitizers functionality.

Reviewers: eugenis

Subscribers: delcypher, llvm-commits, #sanitizers

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

llvm-svn: 326105
2018-02-26 18:27:24 +00:00
Kostya Kortchinsky 0c8ecea88b [scudo] Make some tests less Linux-y
Summary:
Start making the Scudo tests less Linux-y:
- `malloc_usable_size` doesn't exist everywhere, so replace them with
  `__sanitizer_get_allocated_size` which we provide;
- move all the `memalign` related tests into `memalign.c` since it's also not
  available everywhere.

I also noticed that the `memalign.c` was missing a line in one of the loops.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: delcypher, #sanitizers, llvm-commits

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

llvm-svn: 326100
2018-02-26 17:14:44 +00:00
Kamil Rytarowski b6195b59a6 Skip two more ioctl interceptors for NetBSD
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>

llvm-svn: 326084
2018-02-26 13:00:40 +00:00
Dan Liew 17ad62be94 [ubsan-minimal] Fix the ubsan_minimal debug build (COMPILER_RT_DEBUG=1) on 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.

llvm-svn: 326032
2018-02-24 13:14:44 +00:00
Vitaly Buka 1aa98f4294 [cfi] Lazy initialization of CFI interceptors
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

llvm-svn: 326025
2018-02-24 06:58:56 +00:00
Kamil Rytarowski c22867f5fc Correct ctype(3) functions with NLS on NetBSD
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

llvm-svn: 326008
2018-02-24 01:01:14 +00:00
Alex Shlyapnikov 524946232b [Sanitizers] Increase allocated chunk limit for LargeMmapAllocator
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

llvm-svn: 326007
2018-02-24 01:00:27 +00:00
Matt Morehouse ddf352b953 [libFuzzer] Include TEMP_MAX_LEN in Fuzzer::PrintStats.
Reviewers: kcc

Reviewed By: kcc

Subscribers: llvm-commits

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

llvm-svn: 325817
2018-02-22 19:00:17 +00:00
Kamil Rytarowski 663dbfadbf Try to fix the syntax in test
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

llvm-svn: 325751
2018-02-22 07:17:01 +00:00
Kamil Rytarowski c419df9066 Remove empty files
Left over after D43382

llvm-svn: 325744
2018-02-22 06:11:28 +00:00
Kamil Rytarowski 80c2a79437 Xray instrumentation / enabling more tests
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

llvm-svn: 325743
2018-02-22 06:08:26 +00:00
Vitaly Buka e075709b41 [sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externally
llvm-svn: 325720
2018-02-21 21:13:07 +00:00
Evgeniy Stepanov 43271b1803 [hwasan] Fix inline instrumentation.
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

llvm-svn: 325711
2018-02-21 19:52:23 +00:00
Maxim Kuvyrkov 6b287234ea Fix racy msan test
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

llvm-svn: 325703
2018-02-21 18:03:50 +00:00
Kamil Rytarowski 8b5d3ebcbe Msan, fixing DTLS_on_tls_get_addr signature empty implementation
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

llvm-svn: 325664
2018-02-21 04:16:45 +00:00
Kamil Rytarowski 59a9856e06 Add new interceptor: strmode(3)
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

llvm-svn: 325588
2018-02-20 15:53:30 +00:00
Kamil Rytarowski 8317565532 Add new interceptor: fgetln(3)
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

llvm-svn: 325587
2018-02-20 15:52:08 +00:00
Kamil Rytarowski babcdb3a9a Stop intercepting forkpty(3) and openpty(3) on NetBSD
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

llvm-svn: 325585
2018-02-20 15:43:07 +00:00