Derek Schuff [Fri, 11 May 2012 23:04:14 +0000 (16:04 -0700)]
Merge branch 'upstream/master'
Derek Schuff [Fri, 11 May 2012 16:57:13 +0000 (09:57 -0700)]
Import lib/Makefile-pnacl from pnacl-sfi branch of hg
http://code.google.com/p/nacl-llvm-branches/source/list?repo=compiler-rt&name=pnacl-sfi
Log:
Revision:
1a3a6ffb31ea
pnacl does not support the x86 specific 80bit FP type so we do not need
to bloat libgcc with it.
Also removed support functions for 128bit ints.
Those were guarded by "#if __x86_64" and resulted in
empty object files/bitcode file.
Started adding comments for why other code is NOT included in our libgcc.
CL= http://codereview.chromium.org/7232019/
Rev:
8b41cb76e53e
Move libgcc compiler flags into utman so we can experiment
with a bitcode only version.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=1520
CL= http://codereview.chromium.org/7205042/
Rev:
58885e5e10cf
Enable pow(er) functions with compier-rt/libgcc.
This is needed by the sanboxed components.
Rev:
31d5d91b81cc
Make the pnacl Makefile useful
Rev:
23335816c863
add empty pnacl makefile
kcc [Thu, 10 May 2012 15:10:03 +0000 (15:10 +0000)]
[tsan] old-dstyle Makefile for tests; two helper scripts that analyze the assembly code of the hot functions
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@156547
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 10 May 2012 14:18:22 +0000 (14:18 +0000)]
[tsan] ThreadSanitizer tests and micro benchmarks. No makefiles yet.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@156545
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 10 May 2012 14:04:19 +0000 (14:04 +0000)]
[tsan] add the old Makefile (which is the only way to build the tsan-rtl for now)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@156544
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 10 May 2012 13:48:04 +0000 (13:48 +0000)]
[tsan] First commit of ThreadSanitizer (TSan) run-time library.
Algorithm description: http://code.google.com/p/thread-sanitizer/wiki/ThreadSanitizerAlgorithm
Status:
The tool is known to work on large real-life applications, but still has quite a few rough edges.
Nothing is guaranteed yet.
The tool works on x86_64 Linux.
Support for 64-bit MacOS 10.7+ is planned for late 2012.
Support for 32-bit OSes is doable, but problematic and not yet planed.
Further commits coming:
- tests
- makefiles
- documentation
- clang driver patch
The code was previously developed at http://code.google.com/p/data-race-test/source/browse/trunk/v2/
by Dmitry Vyukov and Kostya Serebryany with contributions from
Timur Iskhodzhanov, Alexander Potapenko, Alexey Samsonov and Evgeniy Stepanov.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@156542
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 10 May 2012 12:03:09 +0000 (12:03 +0000)]
Fix ReadFileToBuffer to return 0 on failure (-1 is too large if returned as size_t).
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@156538
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Mon, 23 Apr 2012 13:27:47 +0000 (13:27 +0000)]
[ASan] use CLANG_VERSION in Makefile (currently 3.2)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@155350
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Mon, 23 Apr 2012 10:08:16 +0000 (10:08 +0000)]
[asan] fix asan issue #66 (correctly report type of the bug)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@155344
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Mon, 23 Apr 2012 07:36:24 +0000 (07:36 +0000)]
Bump the LLVM minor version. This should fix our 32-bit Linux build.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@155338
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 19 Apr 2012 14:53:51 +0000 (14:53 +0000)]
[asan] test for issue #66
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@155127
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Mon, 16 Apr 2012 08:33:01 +0000 (08:33 +0000)]
Partially revert r154390 (llvm.org/viewvc/llvm-project?view=rev&revision=154390)
Until we work out the solution for http://code.google.com/p/address-sanitizer/issues/detail?id=65 we'd better not allow
the clients to override AddressSanitizer's signal handler.
The second part of r154390 (removing the sighandler-related tests) is not reverted, because those tests were broken
and didn't test anything.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154803
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Thu, 12 Apr 2012 13:31:13 +0000 (13:31 +0000)]
[asan] minor fix: pass flag -g to output tests as a part of CXXFLAGS
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154589
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Thu, 12 Apr 2012 09:43:57 +0000 (09:43 +0000)]
Don't build atomic.c when building compiler-rt using make
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154583
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Thu, 12 Apr 2012 07:32:08 +0000 (07:32 +0000)]
[ASan] fix output tests - r154570 changed debug info for static functions and now they are symbolized a bit differently
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154581
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Tue, 10 Apr 2012 11:00:26 +0000 (11:00 +0000)]
Change the way ASan interacts with custom signal handlers.
From now on we allow the clients to override signal handlers set by ASan, but print a warning in such a case.
Remove the tests for signal() and sigaction(), because they made little sense even without this change.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154390
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Mon, 9 Apr 2012 16:45:18 +0000 (16:45 +0000)]
[ASan] remove dispatch.h header once again - it's not present on Leopard, and we don't want to break the build of compiler-rt there. See https://trac.macports.org/ticket/33362
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154326
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Mon, 9 Apr 2012 11:50:27 +0000 (11:50 +0000)]
Use 'typename' instead of 'class' in template<> definitions supporting POD types
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154314
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 6 Apr 2012 20:36:18 +0000 (20:36 +0000)]
[asan] last bit for gcc compatibility
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154203
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 6 Apr 2012 20:19:59 +0000 (20:19 +0000)]
[asan] minor change to please gcc
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154201
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Fri, 6 Apr 2012 08:21:08 +0000 (08:21 +0000)]
[ASan] move replacements for new/delete to separate file
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154167
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 6 Apr 2012 01:27:11 +0000 (01:27 +0000)]
[asan] add flags: disable_core, abort_on_error and unmap_shadow_on_exit
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154159
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Thu, 5 Apr 2012 18:33:17 +0000 (18:33 +0000)]
[ASan/Win] Revert the local Makefile change slipped into the prev commit
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154112
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Thu, 5 Apr 2012 18:31:50 +0000 (18:31 +0000)]
[ASan/Win] Fix lint warning
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154111
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Thu, 5 Apr 2012 17:16:32 +0000 (17:16 +0000)]
[ASan/Win] Fix build by using inline assembly instead of an unavailable intrinsic function
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154106
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 5 Apr 2012 15:55:09 +0000 (15:55 +0000)]
[asan] make __asan::Deallocate immune to racy double-free (issue #57)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154097
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 5 Apr 2012 10:54:52 +0000 (10:54 +0000)]
Introduce the use_sigaltstack flag (off by default), which enables using alternate
per-thread stacks for signal handling. This allows to print more verbose error reports
for stack overflows.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154092
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 5 Apr 2012 10:10:57 +0000 (10:10 +0000)]
Allow calling GetCurrentTidOrMinusOne() before AsanThreadRegistry was initialized.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154091
91177308-0d34-0410-b5e6-
96231b3b80d8
chandlerc [Wed, 4 Apr 2012 22:12:04 +0000 (22:12 +0000)]
Initial, very rough cut at a new CMake build system for compiler-rt.
Some high-level notes:
1) An explicit goal is to support building compiler-rt as a subproject
build, checked out into the projects/compiler-rt directory. There are
many other possible ways of building the code here, but this is
optimized for development on LLVM/Clang/compiler-rt, and incremental
trial and testing of the toolchain.
2) The current support is targeted at Linux. I would love to see this
generalized to other platforms, but for the sake of simplicity in
testing, I'm focusing here first.
Much of this patch was paired with Manuel, and I credit him with the
majority of the work here.
Some important caveats that I'll be working on in subsequent patches:
1) This uses the host compiler rather than using the just-built-clang.
2) Currently only x86 is supported.
3) Currently, none of the tests are built or run.
4) Uses CMake's builtin globbing which doesn't update correctly.
5) This is still turned off from LLVM's CMake build until these issues
are addressed
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154060
91177308-0d34-0410-b5e6-
96231b3b80d8
chandlerc [Wed, 4 Apr 2012 22:12:01 +0000 (22:12 +0000)]
Remove the old, and non-functional CMake build system from CompilerRT.
I cannot build any part of this successfully on either Linux or Darwin,
and the replacement is worlds simpler by requiring that this be built as
a subproject of LLVM. If this breaks you for any reason, please let me
know, and let me know what your use case is.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154059
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 4 Apr 2012 11:36:47 +0000 (11:36 +0000)]
[ASan] use correct C-version of strchr on Windows
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@154006
91177308-0d34-0410-b5e6-
96231b3b80d8
d0k [Fri, 30 Mar 2012 21:37:08 +0000 (21:37 +0000)]
Fix the build on 32 bit hosts.
- Add memcpy and memcmp to the stub headers.
- __uint128_t is not available on 32 bit platforms. It's also unused so just
comment it out for now.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153779
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Fri, 30 Mar 2012 17:31:15 +0000 (17:31 +0000)]
Make sure NSObjects are allocated in a way that is visible to ASan.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153762
91177308-0d34-0410-b5e6-
96231b3b80d8
theraven [Fri, 30 Mar 2012 08:35:32 +0000 (08:35 +0000)]
Initial commit of support functions for atomic operations.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153735
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 29 Mar 2012 12:20:47 +0000 (12:20 +0000)]
Add internal_memset and replace the uses of REAL(memset) with it where the performance allows.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153641
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Thu, 29 Mar 2012 08:04:35 +0000 (08:04 +0000)]
[ASan] interceptors for atoi/atol/atoll
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153637
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Wed, 28 Mar 2012 21:03:34 +0000 (21:03 +0000)]
[asan] fix lint
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153601
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Wed, 28 Mar 2012 18:30:10 +0000 (18:30 +0000)]
[asan] add racy double-free test
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153586
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Tue, 27 Mar 2012 16:37:16 +0000 (16:37 +0000)]
Log the allocator messages at a higher verbosity level.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153514
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Mon, 26 Mar 2012 16:42:22 +0000 (16:42 +0000)]
[ASan] add interceptor for strtol
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153444
91177308-0d34-0410-b5e6-
96231b3b80d8
eugenis [Mon, 26 Mar 2012 09:48:41 +0000 (09:48 +0000)]
Avoid including link.h.
It's not available on Android. We only use this header to find out if _DYNAMIC
is present; declaring it "extern void*" does the trick.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153431
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Mon, 26 Mar 2012 09:07:29 +0000 (09:07 +0000)]
[ASan] use macro to define if we should intercept signal/sigaction
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153430
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Sat, 24 Mar 2012 10:12:58 +0000 (10:12 +0000)]
[ASan] revert r153378
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153379
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Sat, 24 Mar 2012 09:47:56 +0000 (09:47 +0000)]
[ASan] simplify ASAN_INTERCEPT_* definitions
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153378
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Sat, 24 Mar 2012 09:10:50 +0000 (09:10 +0000)]
[ASan] use ASAN_INTERCEPT_STRNLEN instead of defined(__APPLE__)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153377
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Sat, 24 Mar 2012 08:39:14 +0000 (08:39 +0000)]
[ASan] add interceptor for strtoll
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153376
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Fri, 23 Mar 2012 13:10:59 +0000 (13:10 +0000)]
[ASan/tests] Make 'noinline' and a bunch of other stuff portable
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153333
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Fri, 23 Mar 2012 12:21:47 +0000 (12:21 +0000)]
[ASan] replace '#if ... or ...' with '#if ... || ...'
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153332
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Fri, 23 Mar 2012 11:33:02 +0000 (11:33 +0000)]
[ASan] Add a few more malloc-related interceptors for Windows
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153327
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 22 Mar 2012 11:29:53 +0000 (11:29 +0000)]
Handle two-byte short jumps in the relocated code.
After the instructions are moved to the branch island, fixupInstructions() expands every 2-byte ja/je instruction with a 1-byte offset into a 6-byte ja/je with 32-bit offset. The offset is fixed to point to the original function.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153249
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Wed, 21 Mar 2012 15:29:28 +0000 (15:29 +0000)]
[asan] extend the test for long double bug
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153190
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 15:02:39 +0000 (15:02 +0000)]
[asan] one more try to remove pthread.h from asan_interceptors.cc
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153188
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 14:33:15 +0000 (14:33 +0000)]
[asan] add missing declarations from string.h and remove this header
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153187
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 14:22:28 +0000 (14:22 +0000)]
[asan] use extern declaraions of libc functions on Win and on Mac
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153186
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 13:44:39 +0000 (13:44 +0000)]
[asan]: remove signal.h system header from interceptors
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153183
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 13:00:04 +0000 (13:00 +0000)]
[asan]: substitute extern decls with system header in asan_mac.cc
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153182
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 12:42:00 +0000 (12:42 +0000)]
[asan] merge mac-specific interceptors into one function
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153180
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 12:29:54 +0000 (12:29 +0000)]
[asan]: remove asan_mac.h
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153179
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 21 Mar 2012 12:03:44 +0000 (12:03 +0000)]
[asan]: start removing os-specific asan_mac.h - move inclusion of mac system header to asan_mac.cc
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153178
91177308-0d34-0410-b5e6-
96231b3b80d8
eugenis [Wed, 21 Mar 2012 11:32:46 +0000 (11:32 +0000)]
[asan] Support for %z to Printf()
At the moment, asan internal Printf() uses %l modifier for printing
values of size_t and related types. This works, because we control
both the implementation of Printf and all its uses, but can be a
little misleading.
This change adds support for %z to Printf(). All callers that print
sizes and pointers as integers are switched to %zu / %zx.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153177
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Wed, 21 Mar 2012 09:33:05 +0000 (09:33 +0000)]
s/Printf/Report for libc interceptors (need this to debug the potential double interception)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153175
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Tue, 20 Mar 2012 11:40:09 +0000 (11:40 +0000)]
[ASan] get rid of setjmp.h header in interceptors
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153085
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Tue, 20 Mar 2012 10:54:40 +0000 (10:54 +0000)]
[ASan]: remove GetMacosVersion from asan_mac.h header
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153084
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Tue, 20 Mar 2012 10:14:55 +0000 (10:14 +0000)]
[ASan]: re-enable noreturn attribute on posix
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@153082
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 16 Mar 2012 22:15:22 +0000 (22:15 +0000)]
[asan] disable GetOwnershipStressTest on non-linux
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152953
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 16 Mar 2012 21:02:13 +0000 (21:02 +0000)]
[asan] added an assert in InitializeAsanInterceptors (it should be run just once)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152945
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Fri, 16 Mar 2012 16:38:31 +0000 (16:38 +0000)]
[ASan] Print the parsed ASAN_OPTIONS for verbosity>0.
Move the flags around slightly.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152929
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 15 Mar 2012 04:26:00 +0000 (04:26 +0000)]
[asan] one more -Wnull-conversion fix
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152773
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 15 Mar 2012 01:36:00 +0000 (01:36 +0000)]
[asan] fix unwinding inside libc intercepors (asan issue #46)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152768
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 15 Mar 2012 01:18:06 +0000 (01:18 +0000)]
[asan] performance optimization: make sure the check for poisoned shadow inside inteceptors is inlined
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152767
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Wed, 14 Mar 2012 22:48:09 +0000 (22:48 +0000)]
[asan] fix -Wnull-conversion warnings
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152747
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Tue, 13 Mar 2012 16:48:46 +0000 (16:48 +0000)]
[ASan] Undo NORETURN on POSIX as it's not clear how to do this cleanly yet
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152631
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Tue, 13 Mar 2012 16:29:25 +0000 (16:29 +0000)]
[ASan] Fix build error on Linux; screen-reviewed by glider@google.com
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152629
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Tue, 13 Mar 2012 16:12:03 +0000 (16:12 +0000)]
[ASan/Win] Eliminate a couple of FIXMEs, add NORETURN to CheckFailed/UNIMPLEMENTED
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152628
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Tue, 13 Mar 2012 10:42:34 +0000 (10:42 +0000)]
[ASan/Win] Fix wrong memmove,memcpy,memset interceptor definitons
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152622
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Tue, 13 Mar 2012 06:46:32 +0000 (06:46 +0000)]
AddressSanitizer: fix a couple of typos
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152617
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Tue, 13 Mar 2012 01:04:06 +0000 (01:04 +0000)]
[asan] output test for memcmp
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152594
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Mon, 12 Mar 2012 11:45:09 +0000 (11:45 +0000)]
[ASan] Add back the support for /MT; intercept statically-linked functions
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152557
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Sun, 11 Mar 2012 12:45:12 +0000 (12:45 +0000)]
[ASan] Use WriteFile instead of fwrite in AsanWrite
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152540
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Sat, 10 Mar 2012 01:30:01 +0000 (01:30 +0000)]
[asan] use O(log(N)) algorithm instead of O(N) in __asan_get_ownership
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152467
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 9 Mar 2012 01:48:18 +0000 (01:48 +0000)]
[asan] add a (disabled) stress test for __asan_get_ownership
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152362
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 8 Mar 2012 22:25:08 +0000 (22:25 +0000)]
[asan]: fix off-by-one error in stack unwinder (asan issue #44; reproduced thanks to 'csmith' fuzzer)
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152347
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Thu, 8 Mar 2012 21:19:07 +0000 (21:19 +0000)]
[asan] don't use dl_iterate_phdr on linux, go back to using /proc/self/maps. Hopefully fixes the problem reported by our mozilla friends.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152341
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Wed, 7 Mar 2012 11:33:15 +0000 (11:33 +0000)]
[ASan] Fix lint warning
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152226
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Wed, 7 Mar 2012 11:19:26 +0000 (11:19 +0000)]
[ASan/Win] Intercept _msize, required for running SQLite
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152224
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Tue, 6 Mar 2012 11:45:59 +0000 (11:45 +0000)]
Force __asan_handle_no_return into the binary built with ASan.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152117
91177308-0d34-0410-b5e6-
96231b3b80d8
efriedma [Tue, 6 Mar 2012 01:21:14 +0000 (01:21 +0000)]
Make sure to properly ifdef out an unused function on OSX < 10.6. PR12136. Patch from Jeremy Huddleston.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152085
91177308-0d34-0410-b5e6-
96231b3b80d8
ddunbar [Mon, 5 Mar 2012 20:46:09 +0000 (20:46 +0000)]
platform/clang_darwin: Fix a comment.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152058
91177308-0d34-0410-b5e6-
96231b3b80d8
ddunbar [Mon, 5 Mar 2012 20:46:06 +0000 (20:46 +0000)]
make/clang_darwin: Tweak CheckArches function to force the integrated-as and use
the stub SDK to try and ensure we always pick up the right archs when they
should be able to be used.
- Also, warn when we drop an architecture.
This is a reapplication of r150232 that should stick now that we have the
integrated assembler on for ARM.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@152057
91177308-0d34-0410-b5e6-
96231b3b80d8
eugenis [Fri, 2 Mar 2012 10:42:10 +0000 (10:42 +0000)]
[asan] Add a negative test for memcpy of long double.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151888
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Thu, 1 Mar 2012 14:39:21 +0000 (14:39 +0000)]
Force __asan_set_death_callback into the resulting binary.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151808
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Wed, 29 Feb 2012 11:43:03 +0000 (11:43 +0000)]
[ASan] Replace CRT .dll malloc with our implementation at asan_init() time
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151715
91177308-0d34-0410-b5e6-
96231b3b80d8
glider [Mon, 27 Feb 2012 14:06:48 +0000 (14:06 +0000)]
Introduce __asan_set_error_report_callback() to allow the client program post-process the error reports.
If the callback is set, Report() and Printf() print the reports into a buffer (together with stderr), which is then passed to the client.
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151528
91177308-0d34-0410-b5e6-
96231b3b80d8
eugenis [Mon, 27 Feb 2012 13:07:29 +0000 (13:07 +0000)]
Replace some #ifdef(s) with plain if(s).
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151526
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Mon, 27 Feb 2012 09:06:10 +0000 (09:06 +0000)]
AddressSanitizer: add some checks to AsanChunkFifoList::PushList
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151521
91177308-0d34-0410-b5e6-
96231b3b80d8
kcc [Fri, 24 Feb 2012 20:49:36 +0000 (20:49 +0000)]
[asan] don't compile gtest with asan when building asan tests
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151391
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Fri, 24 Feb 2012 15:28:43 +0000 (15:28 +0000)]
[ASan] Intercept CreateThread on Windows
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151366
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 22 Feb 2012 16:12:46 +0000 (16:12 +0000)]
AddressSanitizer: quick fix - undef INT32_MIN etc to avoid macro redefinition
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151165
91177308-0d34-0410-b5e6-
96231b3b80d8
samsonov [Wed, 22 Feb 2012 14:07:06 +0000 (14:07 +0000)]
AddressSanitizer: get rid of stdlib.h and add (smaller) stddef.h instead
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151162
91177308-0d34-0410-b5e6-
96231b3b80d8
timurrrr [Wed, 22 Feb 2012 13:59:49 +0000 (13:59 +0000)]
[ASan] Intercept functions on Windows - first version
git-svn-id: http://llvm.org/svn/llvm-project/compiler-rt/trunk@151161
91177308-0d34-0410-b5e6-
96231b3b80d8