| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
GCD has APIs for event sources, we need some more release-acquire pairs to avoid false positives in TSan.
Differential Revision: http://reviews.llvm.org/D18515
llvm-svn: 265660
|
|
|
|
|
|
|
|
| |
In the interceptor for dispatch_sync, we're currently missing synchronization between the callback and the code *after* the call to dispatch_sync. This patch fixes this by adding an extra release+acquire pair to dispatch_sync() and similar APIs. Added a testcase.
Differential Revision: http://reviews.llvm.org/D18502
llvm-svn: 265659
|
|
|
|
|
|
|
|
| |
A little embarrassing, but we're missing the call to FileCheck in several Darwin tests. Let's fix this.
Differential Revision: http://reviews.llvm.org/D18503
llvm-svn: 265658
|
|
|
|
| |
llvm-svn: 265627
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D18845
llvm-svn: 265614
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we don't create the target, don't try to add it as a dependency.
After r265595, we were only creating the SanitizerLintCheck when
`CMAKE_HOST_UNIX` was true.
CMake was emitting a warning:
The dependency target "SanitizerLintCheck" of target "check-ubsan" does not
exist.
llvm-svn: 265613
|
|
|
|
| |
llvm-svn: 265609
|
|
|
|
|
|
| |
`UNIX` is for the target.
llvm-svn: 265595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Freebsd doesn't have <sys/personality.h>, so call personality() only in
SANITIZER_LINUX.
Reviewers: llvm-commits, dvyukov, zatrazz, rengolin, beanz
Subscribers: beanz, emaste
Differential Revision: http://reviews.llvm.org/D18785
llvm-svn: 265378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
After patch https://lkml.org/lkml/2015/12/21/340 is introduced in
linux kernel, the random gap between stack and heap is increased
from 128M to 36G on 39-bit aarch64. And it is almost impossible
to cover this big range. So we need to disable randomized virtual
space on aarch64 linux.
Reviewers: llvm-commits, zatrazz, dvyukov, rengolin
Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines
Differential Revision: http://reviews.llvm.org/D18526
llvm-svn: 265366
|
|
|
|
|
|
| |
Fixes PR27191
llvm-svn: 265322
|
|
|
|
|
|
| |
ignore_interceptors_accesses=1 for GCD tests and printf instead of NSLog).
llvm-svn: 265300
|
|
|
|
|
|
|
|
|
|
|
| |
We've reset thr->ignore_reads_and_writes, but forget to do
thr->fast_state.ClearIgnoreBit(). So ignores were not effective
reset and fast_state.ignore_bit was corrupted if signal handler
itself uses ignores.
Properly reset/restore fast_state.ignore_bit around signal handlers.
llvm-svn: 265288
|
|
|
|
| |
llvm-svn: 265269
|
|
|
|
|
|
|
| |
Move ifdefs to avoid unused static helpers. Move alignment attribute so
that it is respected in GCC and MSVC.
llvm-svn: 265153
|
|
|
|
| |
llvm-svn: 265152
|
|
|
|
|
|
| |
For debugging it is useful to be able to generate dSYM files but not strip the executables. This change adds the ability to skip stripping by setting COMPILER_RT_EXTERNALIZE_DEBUGINFO_SKIP_STRIP=On.
llvm-svn: 265057
|
|
|
|
| |
llvm-svn: 264948
|
|
|
|
|
|
|
| |
This test should fail on OS X Yosemite and older, and pass on OS X El Capitan
and newer as well as on other platforms.
llvm-svn: 264938
|
|
|
|
|
|
|
| |
MSVC_VERSION comes from the _MSC_VER macro, which won't correspond to
the STL version if the host compiler is clang-cl.
llvm-svn: 264901
|
|
|
|
| |
llvm-svn: 264824
|
|
|
|
|
|
|
|
|
|
| |
This test case is meant to check whether verbose error logging works. It
does this by _failing_ to write a profile to a path corresponding to a
directory. Make this clearer by writing to a temporary directory.
Patch suggested by Sean Silva!
llvm-svn: 264817
|
|
|
|
|
|
|
|
|
| |
This also makes it work on PS4 a bit better.
For running the libprofile tests on PS4, we are sneaking environment
variables through on the command line, so the extra argument for
LLVM_PROFILE_FILE was messing up the simple `argc < 2` check.
llvm-svn: 264812
|
|
|
|
| |
llvm-svn: 264792
|
|
|
|
| |
llvm-svn: 264773
|
|
|
|
| |
llvm-svn: 264766
|
|
|
|
|
|
| |
This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives.
llvm-svn: 264751
|
|
|
|
|
|
| |
This addresses PR27077. For some historical reason Darwin wasn't shipping multi3 in the compiler builtin library or in the OS builtin library. This caused building ffmpeg to fail because Polly was generating calls to multi3. It is easy enough to just add the builtin.
llvm-svn: 264750
|
|
|
|
|
|
| |
This just gets rid of a bunch of empty object file warnings. It doesn't impact the generated archives.
llvm-svn: 264749
|
|
|
|
|
|
|
| |
AFAIK there is still no way to avoid `-mllvm -disable-vp=false`
currently.
llvm-svn: 264682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to function names
Summary:
Hopefully this will make it easier for the next person to figure all
this out...
Reviewers: bogner, davidxl
Subscribers: davidxl, cfe-commits
Differential Revision: http://reviews.llvm.org/D18489
llvm-svn: 264680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is implicitly needed at least by gcc-flag-compatibility.test
The thing that needs it is the `\` preceding the "default.profraw"
appended internally by clang when doing `-fprofile-use=`.
Clang uses `\` because is uses sys::path::append which will use `\` on a
Windows host. This is wrong, but I don't think there's an easy way to
solve it (maybe just always using `/` since places that accept `\` also
tend to accept `/`, but not the other way around).
llvm-svn: 264665
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces routines that register and unregister all
instrumented globals in a loaded executable image.
These routines are only implemented on Darwin, where globals metadata
is expected to be placed in the __DATA,__asan_globals section.
Review: http://reviews.llvm.org/D16841
llvm-svn: 264644
|
|
|
|
|
|
|
|
| |
This patch fixes the custom ThreadState destruction on OS X to avoid crashing when dispatch_main calls pthread_exit which quits the main thread.
Differential Revision: http://reviews.llvm.org/D18496
llvm-svn: 264627
|
|
|
|
| |
llvm-svn: 264626
|
|
|
|
| |
llvm-svn: 264625
|
|
|
|
| |
llvm-svn: 264615
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function names
Summary:
Hopefully this will make it easier for the next person to figure all
this out...
Reviewers: bogner, davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18490
llvm-svn: 264612
|
|
|
|
|
|
| |
to the common interceptors")
llvm-svn: 264571
|
|
|
|
| |
llvm-svn: 264521
|
|
|
|
|
|
|
|
|
|
|
| |
On PS4, we have to fake environment variables by passing extra command
line arguments, so the dummy test `argc > 1` was failing.
The condition is just a dummy condition that the compiler can't fold
away, so the number is arbitrary as long as the condition is false.
Increase the number it compares against.
llvm-svn: 264491
|
|
|
|
| |
llvm-svn: 264490
|
|
|
|
| |
llvm-svn: 264488
|
|
|
|
|
|
| |
the Chrome security team)
llvm-svn: 264481
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D18485
llvm-svn: 264480
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, sanitizer_common_interceptors.inc has an implicit, undocumented
assumption that the sanitizer including it has previously declared
interceptors for memset and memmove. Since the memset, memmove, and memcpy
routines require interception by many sanitizers, we add them to the
set of common interceptions, both to address the undocumented assumption
and to speed future tool development. They are intercepted under a new
flag intercept_intrin.
The tsan interceptors are removed in favor of the new common versions. The
asan and msan interceptors for these are more complex (they incur extra
interception steps and their function bodies are exposed to the compiler)
so they opt out of the common versions and keep their own.
Reviewers: vitalybuka
Subscribers: zhaoqin, llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D18465
llvm-svn: 264451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ucrtbase.dll appears to be built with some kind of cross-module
inlining, because there are calls to imported Heap* routines sprinkled
throughout the code. This inlining defeats our attempts to hotpatch
malloc, _malloc_base, and related functions. Failing to intercept an
allocation or deallocation results in a crash when the program attempts
to deallocate or reallocate memory with the wrong allocator.
This change patches the IAT of ucrtbase.dll to replace the addresses of
the imported Heap* functions with implementations provided by ASan. We
don't globally intercept the win32 Heap* functions because they are
typically used by system DLLs that run before ASan initializes.
Eventually, we may want to intercept them, but for now I think this is
the minimal change that will keep ASan stable.
Reviewers: samsonov
Differential Revision: http://reviews.llvm.org/D18413
llvm-svn: 264327
|
|
|
|
| |
llvm-svn: 264271
|
|
|
|
|
|
|
|
| |
On OS X, fork() under TSan asserts (in debug builds only) because REAL(fork) calls some intercepted functions, which check that no internal locks are held via CheckNoLocks(). But the wrapper of fork intentionally holds some locks. This patch fixes that by using ScopedIgnoreInterceptors during the call to REAL(fork). After that, all the fork-based tests seem to pass on OS X, so let's just remove all the UNSUPPORTED: darwin annotations we have.
Differential Revision: http://reviews.llvm.org/D18409
llvm-svn: 264261
|
|
|
|
|
|
|
|
| |
On OS X, internal_mmap just uses mmap, which can invoke callbacks into libmalloc (e.g. when MallocStackLogging is enabled). This can subsequently call other intercepted functions, and this breaks our Darwin-specific ThreadState initialization. Let's use direct syscalls in internal_mmap and internal_munmap. Added a testcase.
Differential Revision: http://reviews.llvm.org/D18431
llvm-svn: 264259
|