| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Fixes PR27191
llvm-svn: 265322
|
|
|
|
|
|
| |
ignore_interceptors_accesses=1 for GCD tests and printf instead of NSLog).
llvm-svn: 265300
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
AFAIK there is still no way to avoid `-mllvm -disable-vp=false`
currently.
llvm-svn: 264682
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adds strnlen to the common interceptors, under the existing flag
intercept_strlen.
Removes the now-duplicate strnlen interceptor from asan and msan.
This adds strnlen to tsan, which previously did not intercept it.
Adds a new test of strnlen to the sanitizer_common test cases.
Reviewers: samsonov
Subscribers: zhaoqin, llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D18397
llvm-svn: 264195
|
|
|
|
|
|
| |
Depending on the version of libcxx, nullptr might not be available. Let's use NULL instead.
llvm-svn: 264058
|
|
|
|
|
|
|
| |
This reduces cflags duplication and allows us to build
sanitizer_common/tests with clang and the VS 2015 STL.
llvm-svn: 264017
|
|
|
|
|
|
|
| |
On the buildbot, strdup appears as frame 1 instead of frame 0. Either is
an acceptable user experience.
llvm-svn: 264016
|
|
|
|
|
|
|
|
| |
Some unit tests were failing because we didn't intercept strdup. It
turns out it works just fine on 2013 and 2015 with a small patch to the
interception logic.
llvm-svn: 264013
|
|
|
|
|
|
|
|
| |
printf is an inline function in VS 2015, giving these tests an
unexpected extra point of coverage. This change works around that by
avoiding printf.
llvm-svn: 264010
|
|
|
|
|
|
|
| |
This resolves errors about char16_t and char32_t when compiling 2015 STL
headers with clang.
llvm-svn: 263973
|
|
|
|
|
|
| |
the debugging API")
llvm-svn: 263946
|
|
|
|
|
|
| |
race_on_mutex.c passes for powerpc64le too after revision 263778. So removing the XFAIL marker.
llvm-svn: 263779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stack trace produced by TSan on MIPS is:
Previous write of size 8 at 0x0120ed2930 by thread T1:
#0 memset
/home/slt/LLVM/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:678
(race_on_mutex.c.tmp+0x0120071808)
#1 __GI___pthread_mutex_init
/build/glibc-g99ldr/glibc-2.19/nptl/pthread_mutex_init.c:84
(libpthread.so.0+0x000000d634)
#2 <null>
/home/slt/LLVM/llvm/projects/compiler-rt/test/tsan/race_on_mutex.c:11 (race_on_mutex.c.tmp+0x01200ea59c)
Reviewers: samsonov, dvyukov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential: http://reviews.llvm.org/D17796
llvm-svn: 263778
|
|
|
|
|
|
|
|
|
|
| |
On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES.
TSan unit tests run with a statically linked runtime, where interceptors don't work. To avoid aborting the process in this case, the patch replaces `DisableReexec()` with a weak `ReexecDisabled()` function which is defined to return true in unit tests.
Differential Revision: http://reviews.llvm.org/D18212
llvm-svn: 263695
|
|
|
|
|
|
|
|
| |
This patch adds a new TSan report type, ReportTypeMutexInvalidAccess, which is triggered when pthread_mutex_lock or pthread_mutex_unlock returns EINVAL (this means the mutex is invalid, uninitialized or already destroyed).
Differential Revision: http://reviews.llvm.org/D18132
llvm-svn: 263641
|
|
|
|
| |
llvm-svn: 263553
|
|
|
|
|
|
|
|
| |
On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES.
Differential Revision: http://reviews.llvm.org/D18121
llvm-svn: 263551
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That change did:
-#if defined(__BIG_ENDIAN__)
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
If __BYTE_ORDER__ and __ORDER_BIG_ENDIAN__ aren't defined, like
they are with MSVC, this condition is true (0 == 0).
Fixes PR26919.
llvm-svn: 263324
|
|
|
|
| |
llvm-svn: 263311
|
|
|
|
|
|
| |
This time actually tested on Linux, where the test is not XFAILed.
llvm-svn: 263294
|
|
|
|
| |
llvm-svn: 263293
|
|
|
|
|
|
|
| |
The CHECK line was matching stack-buffer-overflow from puts calling
strlen, which is not the bug the test is trying to catch.
llvm-svn: 263282
|
|
|
|
| |
llvm-svn: 263195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now ASan can return virtual memory to the underlying OS. Portable
sanitizer runtime code needs to be aware that UnmapOrDie cannot unmap
part of previous mapping.
In particular, this required changing how we implement MmapAlignedOrDie
on Windows, which is what Allocator32 uses.
The new code first attempts to allocate memory of the given size, and if
it is appropriately aligned, returns early. If not, it frees the memory
and attempts to reserve size + alignment bytes. In this region there
must be an aligned address. We then free the oversized mapping and
request a new mapping at the aligned address immediately after. However,
a thread could allocate that virtual address in between our free and
allocation, so we have to retry if that allocation fails. The existing
thread creation stress test managed to trigger this condition, so the
code isn't totally untested.
Reviewers: samsonov
Differential Revision: http://reviews.llvm.org/D17431
llvm-svn: 263160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stable-runtime definition from ASan tests.
Summary: This is an initial setup in order to move some additional tests from Linux onto Posix.
I also moved decorate_proc_maps onto the Linux directory
Finally added msan's definition for "stable-runtime".
Only a test requires it, and its commit message (r248014) seems to imply
that AArch64 is problematic with MSan.
Reviewers: samsonov, rengolin, t.p.northover, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17928
llvm-svn: 263142
|
|
|
|
|
|
| |
(nil) or (null) on different platforms.
llvm-svn: 263137
|
|
|
|
|
|
|
|
| |
Currently, TSan only reports everything in a formatted textual form. The idea behind this patch is to provide a consistent API that can be used to query information contained in a TSan-produced report. User can use these APIs either in a debugger (via a script or directly), or they can use it directly from the process (e.g. in the __tsan_on_report callback). ASan already has a similar API, see http://reviews.llvm.org/D4466.
Differential Revision: http://reviews.llvm.org/D16191
llvm-svn: 263126
|
|
|
|
| |
llvm-svn: 263106
|