Age | Commit message (Collapse) | Author |
|
On Darwin, MAP_ANONYMOUS is a synonym for MAP_ANON. However, some SDK's
don't define MAP_ANONYMOUS. Use MAP_ANON to work around this.
(As a point of interest, the situation is exactly reversed on Linux.)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267907 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D18813
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267902 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Resubmit of http://reviews.llvm.org/D19495 enabled only on intel.
Subscribers: kubabrecka
Differential Revision: http://reviews.llvm.org/D19561
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267750 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Private symbols in PDBs do not have parameter types in their names so we
have to drop the parens from the lambda call operator.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267735 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
On windows platform assert() call creates two distinct CFG edges
which are coverage-instrumented. Simply calling assert would
change coverage numbers on the platform.
Subscribers: kubabrecka
Differential Revision: http://reviews.llvm.org/D19514
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267610 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D19134
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267548 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r267477.
It broke our bots that enables the AArch64 backends, it seems that
this code is using a Darwin *X86 specific* field.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267526 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This fixes fails in test/msan/dlerror.cc - when real dlerror calls strcmp,
our strcmp interceptor now skips poison checking, since it's called in
interceptor context. Strictly speaking, only the dlerror change is
necessary to fix the fail, but let's also change the other two just in case.
Differential Revision: http://reviews.llvm.org/D19499
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267486 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Subscribers: kubabrecka
Differential Revision: http://reviews.llvm.org/D19495
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267477 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Adds libc interceptors to the runtime library for the new
EfficiencySanitizer ("esan") family of tools. The interceptors cover
the memory operations in most common library calls and will be shared
among all esan tools.
Reviewers: aizatsky
Subscribers: zhaoqin, tberghammer, danalbert, srhines, llvm-commits, vitalybuka, eugenis, kcc
Differential Revision: http://reviews.llvm.org/D19411
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267293 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by Vitaly Buka.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267088 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fix and enable working stack-use-after-scope tests.
Add more failing tests for the feature, for fix later.
PR27453.
Patch by Vitaly Buka.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267084 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Adds the initial version of a runtime library for the new
EfficiencySanitizer ("esan") family of tools. The library includes:
+ Slowpath code via callouts from the compiler instrumentation for
each memory access.
+ Registration of atexit() to call finalization code.
+ Runtime option flags controlled by the environment variable
ESAN_OPTIONS. The common sanitizer flags are supported such as
verbosity and log_path.
+ An initial simple test.
Still TODO: common code for libc interceptors and shadow memory mapping,
and tool-specific code for shadow state updating.
Reviewers: eugenis, vitalybuka, aizatsky, filcab
Subscribers: filcab, vkalintiris, kubabrecka, llvm-commits, zhaoqin, kcc
Differential Revision: http://reviews.llvm.org/D19168
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267060 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267028 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The field "pid" in ReportThread is used to store the OS-provided thread ID (pthread_self or gettid). The name "pid" suggests it's a process ID, which it isn't. Let's rename it.
Differential Revision: http://reviews.llvm.org/D19365
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266994 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This happens on Linux when building as C (not C++) with optimization.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266931 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Removed unwanted --check-prefix=CHECK from the following unit tests:
test/asan/TestCases/Posix/start-deactivated.cc
test/tsan/Darwin/ignored-interceptors.mm
Patch by: Mandeep Singh Grang (mgrang)
Reviewers: samsonov, kcc, dvyukov, eugenis
Differential Revision: http://reviews.llvm.org/D19281
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266813 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Test that asan detects access to the dead variable captured by lambda.
Reviewers: aizatsky, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19238
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266676 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
At the moment almost every lit.site.cfg.in contains two lines comment:
## Autogenerated by LLVM/Clang configuration.
# Do not edit!
The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from
configure_lit_site_cfg with the note and some useful information.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266520 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Some tests didn't merge stderr with stdout.
Patch by Maxim Kuvyrkov.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266426 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r266294, as it broke some buildbots again. :/
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266300 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Using stderr more uniformily, avoiding potential races when scanning stdout
and stderr output.
Patch by Maxim Kuvyrkov.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266294 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The custom zone implementation for OS X must not return 0 (even for 0-sized allocations). Returning 0 indicates that the pointer doesn't belong to the zone. This can break existing applications. The underlaying allocator allocates 1 byte for 0-sized allocations anyway, so returning 1 in this case is okay.
Differential Revision: http://reviews.llvm.org/D19100
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266283 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
With -fsized-deallocation, new[] vs delete mismatch is reported as
new-delete-type-mismatch. This is technically true, but
alloc-dealloc-mismatch describes it better.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266246 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266240 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Disable FORTIFY_SOURCE and explicitly disable stack protector in the
no-stack-protector run.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266106 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266006 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265919 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
glibc can use one of 2 layouts for semaphores: architectures that
don't HAVE_64B_ATOMIC use an uint32_t field with semaphore value,
then a private field, then a waiting thread count field - this is
the layout currently assumed by the test. However, HAVE_64B_ATOMIC
arches use a fused uint64_t field that contains the value in low bits
and waiting thread count in high bits, followed by a private field.
This resulted in taking private field from the wrong offset on 64-bit
atomic platforms (the test still passed, but didn't actually test
the private field). On big-endian platforms, this resulted in a fail,
since the first 4 bytes overlay the thread count field, and not
the value field.
Found while porting ASan to s390x.
Patch by Marcin Kościelnicki.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265715 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265714 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265692 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On one of our testing machines, we're running the tests under heavy load, and especially in the fork-based TSan tests, we're seeing timeouts when a test uses sleep(10), assuming that calling fork() on another thread will finish sooner than that. This patch removes a timeout and makes another one longer.
Differential Revision: http://reviews.llvm.org/D18476
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265666 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
OS X provides atomic functions in libkern/OSAtomic.h. These provide atomic guarantees and they have alternatives which have barrier semantics. This patch adds proper TSan support for the functions from libkern/OSAtomic.h.
Differential Revision: http://reviews.llvm.org/D18500
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265665 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Adding an interceptor with two more release+acquire pairs to avoid false positives with dispatch_apply.
Differential Revision: http://reviews.llvm.org/D18722
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265662 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
XPC APIs have async callbacks, and we need some more happen-before edges to avoid false positives. This patch add them, plus a test case (sorry for the long boilerplate code, but XPC just needs all that).
Differential Revision: http://reviews.llvm.org/D18493
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265661 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265660 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265659 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265658 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265627 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D18845
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265614 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265613 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Fixes PR27191
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265322 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
ignore_interceptors_accesses=1 for GCD tests and printf instead of NSLog).
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265300 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264938 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264824 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264817 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264812 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264792 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264773 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@264766 91177308-0d34-0410-b5e6-96231b3b80d8
|