• Home
  • History
  • Annotate
  • only in /external/compiler-rt/lib/asan/tests/
History log of /external/compiler-rt/lib/asan/tests/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d71de26cedae3dafc17449fe0182045c0bd20e8 21-Jul-2014 Stephen Hines <srhines@google.com> Update compiler-rt for rebase to r212749.

Includes a cherry-pick of:
r213309 - fixes umodsi3

Change-Id: Ic7367e3586b6af7ef74bee6a8cf437d5f28d975a
MakeLists.txt
san_asm_test.cc
san_interface_test.cc
san_noinst_test.cc
31a5cd83406be83bcdb91df03e16816e3af8c615 14-Jun-2014 Dan Albert <danalbert@google.com> Exclude Android from the tests for valloc/pvalloc.

These functions are being removed from Android because they were removed
from POSIX 2004.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210962 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
MakeLists.txt
san_asm_test.cc
san_fake_stack_test.cc
san_interface_test.cc
san_mem_test.cc
san_noinst_test.cc
san_oob_test.cc
san_racy_double_free_test.cc
san_str_test.cc
san_test.cc
san_test_config.h
san_test_utils.h
b37127085cbcc79f5f859bfab8e7204201c18287 05-Dec-2013 Kostya Serebryany <kcc@google.com> [asan] port r196375 to 3.4

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@196478 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_utils.h
8c6e4855ac47415f1f2863690860f24213638cb5 14-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Introduce a top-level target to collect all ASan runtimes and deps

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194696 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1b17f5b79d58c5aff291dde05727ad0b215b81c6 13-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Do not rely on malloc context in allocator reports.

Invoke a fatal stack trace unwinder when ASan prints allocator-relevant
error reports (double-free, alloc-dealloc-mismatch, invalid-free).
Thus we'll be able to print complete stack trace even if allocation/free
stacks are not stored (malloc_context_size=0).

Based on the patch by Yuri Gribov!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194579 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
7f80655d8283dbdf77bfee4a849eed4d59e95c7a 01-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Kill use_stack_depot runtime flag and stack trace compression routines.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193868 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
cc794ab9b8f9066ca7b790ca0dbb197d591e14c4 29-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Maybe fix test failures on lld bots.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193647 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0f63831345e26b23d85a67e2dd96129f48eec477 16-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Remove CallocOverflow32 test from asan_test.

The same as with MSan, this test behavior depends on ASAN_OPTIONS, and we've
got a lit_test that covers this.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192777 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
e1c68c319a0113be832da17a777892353a8b5f23 27-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191510 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack_test.cc
6186bfc81d988b650d2acad44bcde00fda799818 24-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix GCD tests by spinning forever in the main thread.
Since the error is always reported by one of the GCD workers, this will help avoid premature program termination with exit code 0.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191294 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test_helpers.mm
cf2cabb752ffeff152ed471fa407a415c404d6e4 23-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] remove -fsanitize=use-after-return from the tests (this flag now comes with asan by default)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191204 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
b812253202f2db9d60a543b22226064d1ed20279 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix compilation of asan_str_test.cc on non-Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191083 91177308-0d34-0410-b5e6-96231b3b80d8
san_str_test.cc
d4d7040ee026ab04502c42327ed5081f704a8e3c 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Enforce the memmove semantics for both memcpy() and memmove() interceptors on Darwin.

Due to bugs in the interposition of resolver functions on 10.7 and 10.8 both memcpy() and memmove()
were previously intercepted by INTERCEPTOR(memcpy), which led to false positives and crashes (see http://llvm.org/bugs/show_bug.cgi?id=16362)
We choose to use a memmove-like function in both cases. This effectively disables the overlap checks in memcpy(), but the overlaps
aren't possible in practice, because memcpy() and memmove() are the same function on Darwin.

Once the interposition is fixed in 10.9, we'll need to revisit this issue, see https://code.google.com/p/address-sanitizer/issues/detail?id=226


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191081 91177308-0d34-0410-b5e6-96231b3b80d8
san_str_test.cc
46817813bcbd9a74429e36f1d423b55caed4efd2 17-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Enable fake stack test on Mac and Android, as no-instrumentation tests are now fixed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190856 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5d9d807a9d82b566387e3064882a87cb8fd4ef22 17-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Link tests with -pie if ASan runtime uses zero-base shadow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190853 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
b388987bf988435ee87dc4848ea8e62ebfa942eb 17-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] further speedup use-after-return: simplify deallocation of fake frames. ~ 20% speedup.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190852 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack_test.cc
382bbc80dc7a93a28b565b62b383b904fc1205a4 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Don't link with pthread on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190794 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
05fa3808f6ac96023cdf583a1a1b7220e5b451b8 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Split ASan unit tests into two different binaries:

(1) instrumented, i.e. compiled and linked with -fsanitize=address
(2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190788 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_interface_test.cc
san_noinst_test.cc
san_test.cc
9c59ca89870cd82a1a13e5daf381951bfacba203 13-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Temporary disable UAR unit test on Android due to https://code.google.com/p/address-sanitizer/issues/detail?id=222

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190667 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0f2283742e1d37ebf0c5ac034dab704a7d9af099 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] don't record the class_id in FakeFrame (scratching the last bits of performance)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190666 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack_test.cc
b1173c27c2791aef27304e68911a11648401064d 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] a bit of performance improvement in fake stack, generalized one test, fixed android build of another test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190606 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack_test.cc
bdd9545da55933797edf58c6049d894ed0efb465 12-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Do not build asan_fake_stack_test.cc on OSX until https://code.google.com/p/address-sanitizer/issues/detail?id=222 is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190597 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ac3ae5dc29d3623ada2bcb0db22ee88b0382e3b1 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] fully re-implement the FakeStack (use-after-return) to make it faster and async-signal-safe. The implementation is not yet complete (see FIXMEs) but the existing tests pass.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190588 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_fake_stack_test.cc
34e3ed1db94c5ce9784d7ffb8d66a54cf523e09c 10-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190406 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
1a249181dcdf217d368fbf4c1f09d8af7e617cb0 08-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] turn on leak checking for ASan tests and fix a few discovered leaks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190274 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_str_test.cc
e9e4f04e8320d35ab19dfb8688a7bdd3e5ae7cbb 06-Sep-2013 Alexey Samsonov <samsonov@google.com> Fix compiler warning introduced in r190022

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190137 91177308-0d34-0410-b5e6-96231b3b80d8
san_str_test.cc
f7f2e431263cc0aa321218ce8978b289187a39a3 06-Sep-2013 Alexey Samsonov <samsonov@google.com> Migrate ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS to new spelling - ATTRIBUTE_NO_SANITIZE_ADDRESS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190136 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
48b7ee943e01a206600b0189e6b2b0125c4dd1d1 06-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190128 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
9150f397ba4c5478275d72665ea3e53a84c7076a 06-Sep-2013 Kostya Serebryany <kcc@google.com> [sanitizer] make the allocator crash instead of returning 0 on huge size (controlled by the allocator_may_return_null flag)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190127 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
b99228de65b408b0acd9618b92774fb8add7e482 05-Sep-2013 Reid Kleckner <reid@kleckner.net> asan: Add a wcslen interceptor mirroring strlen

Tested on Linux, since I can't build the tests on Windows yet.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190022 91177308-0d34-0410-b5e6-96231b3b80d8
san_str_test.cc
6102afb6651a43f6fa3c66810e321e464aff1172 28-Aug-2013 Kostya Serebryany <kcc@google.com> [asan]: fix a CHECK failure in use-after-return mode; enable and fix stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189457 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
2ec879ebd7261c9182d4fdee95fb615439dda67d 18-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] Fix leaks in ASan tests found by LSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186577 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
5d43b5a695ca6b6dc4eff05e723a7f39643f3266 10-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] fix the bug with memalign and malloc_usable_size (http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183647 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
722f2e6a6125a0d5c9d453278b0f292e3410124d 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] make pthread_getschedparam test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183411 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
87bd39a72b65f1ef5c5a33fc8ba3aebae998903e 04-Jun-2013 Alexey Samsonov <samsonov@google.com> Call __asan_free_hook() before marking the chunk quarantinned

Summary:
With this change, the user may safely call __asan_get_ownership()
from malloc/free hooks and assume it would return "true". If there is a
realloc/free race, free hook might be called twice, but I think it's acceptable,
as it's a data race and would later be reported anyway.

This change also fixes a bug when failing realloc incorrectly marked the
original memory as "quarantinned".

Reviewers: timurrrr, kcc, samsonov

Reviewed By: samsonov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D913

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183220 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
30e970f769ccf11e61e472c6f8b22f8e866c592f 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] workaround for asan bug 189 (swapcontext followed by throw gets OOM kill). Also, disable swapcontext_test on non-x86. Fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182456 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
56d3472104dd9fec6578e02f4895f3254e038e8e 21-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept pthread_getschedparam.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182353 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
41d69f4fd5454d5bf2614cbb3e8ed77a935c880b 20-May-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix realloc'ing freed/invalid pointers

See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182255 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
9277b1ff831ad4e3979e7a6203e838d6d62266c6 16-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix ShadowGapTest on PowerPC64

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181991 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0bdc46c7ee03e8c4e4da7c5ac43edac237aa53e2 15-May-2013 Kostya Serebryany <kcc@google.com> [asan] disable BuiltinLongJmpTest on PowerPC

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181890 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
f931da85ce8668751628ded926ecad013c5d6f1a 15-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix powerpc build and one test; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181881 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
33280bba681b7bb683be01749aaba70dc06ffb6c 08-May-2013 Sergey Matveev <earthdok@google.com> Quick fix for ASan test build on Android.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181429 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
8db82e151f4dc3de33530adce370a3d86be54cf9 23-Apr-2013 Alexander Potapenko <glider@google.com> [ASan] Disable AddressSanitizer.AllocDeallocMismatch on Darwin.
See https://code.google.com/p/address-sanitizer/issues/detail?id=131.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180093 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
b1971ca4a3057916ca90a733c672a08127d5fe67 04-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] nuke the old unused allocator code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178758 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_oob_test.cc
50f3daa00d3da0a80c8798a3e977705e96ec106f 22-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] Change the way we report the alloca frame on stack-buff-overflow.

Before: the function name was stored by the compiler as a constant string
and the run-time was printing it.
Now: the PC is stored instead and the run-time prints the full symbolized frame.
This adds a couple of instructions into every function with non-empty stack frame,
but also reduces the binary size because we store less strings (I saw 2% size reduction).
This change bumps the asan ABI version to v3.

compiler-rt part, llvm part will follow.

Example of report (now):
==31711==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa77cf1c5 at pc 0x41feb0 bp 0x7fffa77cefb0 sp 0x7fffa77cefa8
READ of size 1 at 0x7fffa77cf1c5 thread T0
#0 0x41feaf in Frame0(int, char*, char*, char*) stack-oob-frames.cc:20
#1 0x41f7ff in Frame1(int, char*, char*) stack-oob-frames.cc:24
#2 0x41f477 in Frame2(int, char*) stack-oob-frames.cc:28
#3 0x41f194 in Frame3(int) stack-oob-frames.cc:32
#4 0x41eee0 in main stack-oob-frames.cc:38
#5 0x7f0c5566f76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#6 0x41eb1c (/usr/local/google/kcc/llvm_cmake/a.out+0x41eb1c)
Address 0x7fffa77cf1c5 is located in stack of thread T0 at offset 293 in frame
#0 0x41f87f in Frame0(int, char*, char*, char*) stack-oob-frames.cc:12 <<<<<<<<<<<<<< this is new
This frame has 6 object(s):
[32, 36) 'frame.addr'
[96, 104) 'a.addr'
[160, 168) 'b.addr'
[224, 232) 'c.addr'
[288, 292) 's'
[352, 360) 'd'




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177723 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
7dd282c0c7d3ca32ee94092289bd802e16fe9867 22-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Fix an error on invalid deallocation in ASan allocator. When ASan checks if memory freed by user was indeed previously allocated, it first does an atomic write to presumed location of chunk header. This is wrong, as if the free is invalid, we may overwrite some valuable data (like other fields of the chunk header). Fix this by using atomic_compare_exchange instead.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177710 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
18ec84c543243310a8ca3e64a1d851bc43e5fa39 18-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] make the __asan_get_heap_size more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177270 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
00545a3625aaa765eef2da9b3e197a0e00e94550 18-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Switch to allocator2 on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177263 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
d39a34ee33aae73fdde065f784bdc19f67b91ae2 14-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177069 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
san_test.cc
san_test_config.h
d4de2a1a7b15d0ed1a303b1604894ae82d5e8748 01-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Revert r176255, r176264.

New allocator has 1.5x memory overhead of the old one.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176340 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
df4f6de48d1efe0cf6ed0a7b867e86b45985e85a 28-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Lower memory usage in LargeMallocTest on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176264 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
b9e1319f97a9d9c2d13090e162e66ebdfbb419dd 27-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] if calloc returns a freshly-mmaped memory, don't clear it with memset. Speeds up calloc-intensive code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176185 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
1b057b20db71ec6cc2bac460c8b2848f0889d47d 26-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] fix the output for range accesses (memset, etc); improve the tests; more strict checking in memcmp

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176078 91177308-0d34-0410-b5e6-96231b3b80d8
san_mem_test.cc
san_test.cc
a84805f1ccb2b7d4b6c0ba384bd3541fa4eaf808 21-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] speedup by more than 2x handling of the small memset/memcpy/etc calls

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175728 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
4c3e573425e584867e12c3f5d3df524c20b06509 20-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] revert part of r175631 that looks like accidental commit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175655 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
7c2a3bbabc7d3bcc66ad7a076bed9a4b86a3626d 20-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Delete asan/dynamic dir and temporarily move the interposers declarations to asan_intercepted_functions.h
Now that we have only one dependency on asan_intercepted_functions.h, we can unite that code with the interceptors declarations in asan_interceptors.cc and get rid of asan_intercepted_functions.h


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175631 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
7f4df1a0e1e1b2ace94d4d78b03c222887dbb00c 19-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] don't run the long double test if long double is the same as double

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175514 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
366984e3aa286f7b4fb45f5c9e703f2768c407ed 19-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

asan-rt part

Also fix lint.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175508 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c74b2ccbc0cf40bb401ebf3758e8e964b22acb3a 14-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] use short path for sanitizer_common/tests/sanitizer_test_utils.h, add -I sanitizer_common/tests to asan/tests/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175142 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_test_utils.h
5d48617936d6415f2037a5e1b9d57f9077ee92ef 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Enable alloc_dealloc_mismatch by default on Darwin.
Enable AddressSanitizer.AllocDeallocMismatch tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174628 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
73700ac2a7ced591261ad11199d9d4a7112304bb 01-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] remove debug output from the test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174188 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c70fa28caaaec2134f2c2230821fcc0f0d7ac27e 31-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] Split ASan interface header into private and public parts. Add a test that makes sure users can include interface header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174058 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
a180078ee0120c049f9fb495f930053f80f105aa 29-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173795 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
d91699339fd7e022aef0eaa8f401af0f8942068b 29-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] Do allocate memory even for zero-size allocation requests. Explain why we have to do this in comments.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173776 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
a3ab1a7da70a5ef111257ba8887920c1fdcd7be5 28-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix a bug in allocator-v2 which could lead to SEGV on realloc(malloc(0), 4)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173681 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
f6acafcaf557fa8f89794ac08597a854475dfc73 28-Jan-2013 Alexey Samsonov <samsonov@google.com> [CMake] Fix compiler-rt tests after r173617

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173668 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
b2efe13f3a0fb9af55cce39a497d951567e78816 25-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] improve the calloc overflow check (spotted by samsonov@)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173443 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
65199f1b253c4bfb225805629217acb8f0b1e185 25-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] fix calloc overflow in asan/tsan/msan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173441 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
af5bd2ee59a9f7bea74f43fccc6ea48979b7a4b0 24-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] run-time tests for adaptive redzones

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173336 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals_test.cc
san_noinst_test.cc
san_test_utils.h
e5ab9688b623a5a0150c7eae1ec1caaf06d44758 23-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] initialize kHighMemEnd at startup (instead of at compile time) to simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173260 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660 23-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] simplify the code that poisons global redzones, add some more tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173251 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals_test.cc
san_noinst_test.cc
san_test.cc
san_test_utils.h
3b9e668d6056cf7fb791e630d931ebaaf59b4981 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: use Clang -fsanitize-blacklist flag in unit tests (instead of -mllvm)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173142 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c92a42161d8c513c01fd1bcaf60387f50cc4981f 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: simplify build rules for unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173133 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5e5be21cc6165ae16a3002f0c3bace10c493491b 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: disable flexible mapping and offset on Android. It doesn't work for dynamic ASan runtime there

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173132 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
8fb1264341c079eda3e10480fb807a0f52bb8b19 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc even more

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173131 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_str_test.cc
san_test.cc
6cbfae439b81221d2250ffe0331958f130259755 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc more

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173130 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_mem_test.cc
san_test.cc
san_test_utils.h
38db30686c5962f8b5c877e29c6669d72198d42b 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc to speedup parallel build (most important if building with a debug clang, which takes a couple of minutes on this large file with templates). More splits to follow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173129 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_oob_test.cc
san_test.cc
san_test_utils.h
44997c354c7cdb5257d9a41c837b12a6133f2d6b 21-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix linux build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173049 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
8c745fc58d8aca66db1170b1cdbbc0a7743c20a0 21-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Move Mac-specific tests to asan_mac_test.cc



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173048 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_mac_test.cc
san_mac_test.mm
san_mac_test_helpers.mm
san_test.cc
d0b1d4605b05b744480f0ca54f996578ca216cf8 21-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: generalize checking for target availability and add initial support for PowerPC native arch. With this patch, building LLVM on PowerPC native arch produces a working ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173044 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
87b52b910037447eccb92546b24b5e06181a1545 21-Jan-2013 Alexey Samsonov <samsonov@google.com> Fixup for r173021: build tests with zero-based shadow on Android only, fix condition in checking for shadow gap in asan_mapping.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173026 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
ee485d42c43635f874e3197f636280a6b0f8c545 21-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173021 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
392c50d4a56557a51a353509c665188aef115f74 18-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2f3aef010fdeadfe7ec995dc534544acb5f357fb 18-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake variables renaming: X86_64->x86_64 I386->i386

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172812 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ca2849c2819b5c7a8771a1e8bc449cf8f5ef6527 18-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fixes for Android build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172800 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
c20b321d49f0eff60f1394d56e623d8ca94f24d7 18-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172791 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
29b37ea8907bc99bf86fab89bf8dc93a520ebac4 17-Jan-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r172719, r172721-172723, and r172725.

The r172719 patch broke the build on Mac, the others depended on it.

compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
'SetThreadName' [-Werror,-Wunused-function]
static void SetThreadName(const char *name) {

Orignal headlines:

[asan] attempting to fix the Mac build
[asan] restructure read/pread/pread64 tests
[sanitizer] move write/pwrite/pwrite64 interceptors to common
[msan] start using common interceptors in msan
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172763 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0fc2f6935568db9252272bd9c00895255d7f78b9 17-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Allow __asan_get_allocated_size(malloc(0)) to be 0 or 1

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172726 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
c39ea447d6632314d6e0198b3559830298df5155 17-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] restructure read/pread/pread64 tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172723 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
220ba2f6f98d44e1e8a88b4dee8ed456cf54ff33 17-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix __asan_get_ownership(p) and __asan_get_allocated_size(p) for the p = malloc(0)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172717 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
48ddbef1d051875b2d0b204e8d78300b58d80a85 14-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Move large part of asan_test_utils.h to sanitizer_common.
Move my_rand() to the common header.

This lets us avoid the use of rand_r in sanitizer_common tests.
There is no rand_r on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172421 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
san_test_utils.h
29e09223b9d4f53f1be528d6a572b66034c26611 14-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Disable alloc/dealloc mismatch test on Android. It's not supposed to work there

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172398 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
8f0e311767b783db4a15139dddfe7a924fa3724e 14-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Disable alloc/dealloc-mismatch checker on Mac for now (it produces weird false positives on googletest)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172394 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
b8a59a0e030d0aacf4df1fe8f7fb4e6f82bab654 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] don't fail the test if prctl(PR_SET_NAME) is not supported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172059 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
b3ef8a4521954d1ca5e728446c389e1f8cc01fc4 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: do less work under the quarantine lock; make the strcasecmp test more resistant to the contents of unaddressable memory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172048 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
7125bb35fb2351040534a194c9c1aa8cb71cfb19 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] better protect the tests from memset/memcpy inlining, explicitly include unistd.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172045 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
13ddcf695e10bed51faceff49469e1c83d64b51c 29-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] make LargeOOBInMemset test resistant to clever compiler optimizations

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171223 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c0d37b35439897aea821319a669832b16848cb65 28-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix a build warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171200 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
eb2809311c94b73c269ccef8d68ae368642e5754 28-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] implement more strict checking for memset/etc parameters. Instead of checking the first and the last byte, we check the entire shadow region. This costs ~10 slowdown for the instrumented functions. Motivated by a nasty memset-buffer-overflow-by-140-bytes in chrome which was reported as a use-after-free or not at all

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171198 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
d7d7b5f39cf5bbc36403afb0a94d473519c7ab78 27-Dec-2012 Alexey Samsonov <samsonov@google.com> Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can produce working binaries and use it in build rules for sanitizers tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171160 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
709a33e1cf20eb7f00653fe32dc07714b3f2c633 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: do not align the requested size to the redzone size (saves a bit more memory)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171111 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c35314a119aba6d5e7fa0a06024f9cb1c49e6f5f 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement adaptive redzones. Now with asan_allocator2 allocations <= 48 bytes have 16 byte redzone, allocations of 48-96 bytes -- have 32 bytes redzone, etc (max redzone is 2048). If ASAN_OPTIONS=redzone=n is set, it changes the minimal redzone size

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171107 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
f1877cf0a314f407ac535ab1606fdac4f9b05026 25-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a test for right OOB with special large sizes. Fix this test in asan_allocator2. More test tweaking for allocator2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171058 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
e52810d7144ca35bbaeca0b28d138b386ab90243 25-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] properly define ASAN_LOW_MEMORY. Due to a mistake it has been always true causing redzone and quarantine sizes to be smaller than it was some time before (and out of sync with the documentation). Also make one test less greedy

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171052 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
68d3a1bae35be595faf7d9f028a268f390501029 24-Dec-2012 Kostya Serebryany <kcc@google.com> [sanitizer] fix gcc warnings, enable one tests under asan_allocator2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171036 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
032e833059a673a21facc8e726b5c0c9d1a13d2e 21-Dec-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] CMake build rules for unittests: depend on headers when compiling a file with custom clang.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170897 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
32b8991f961e585ccfe1710f5402a14b4e44cecc 21-Dec-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Don't implicitly add object files to the list of dependencies when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170870 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
fe6d91684bcda766593800f6307233f1a33d31f6 21-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a flag alloc_dealloc_mismatch (off by default for now) which finds malloc/delete, new/free, new/delete[], etc mismatches

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170869 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
be9796d7148b89f20ca04ffdf3fa98ac84bd1141 21-Dec-2012 Richard Relph <Richard.Relph@amd.com> Clean up some warnings that become errors. Seen in Xcode.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170843 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.mm
san_test.cc
b34cf49e723cf28a27ce3a785da937d82c6484b9 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement memalign

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170697 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
c311105fd64219bb96b6467c3707ebda355be87b 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add memalign tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170687 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
376bab8add6be88f649ef1a9127c7d39e76e5f7b 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: make all remaining tests pass.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170680 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
0b770b48e4ae053a7d0610e1c682405afba58fda 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add ASAN_PCRE_DOTALL to two new multi-line regexps

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170677 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
2f66ab25cbb000289b79bca042b4136d92331b44 20-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't use -fsanitize=address linker flag for unit tests on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170670 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c47a45154543b5eba68c9473d3ed807927027cf3 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] explicitly link with dynamic ASan runtime when building unittests on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170552 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
bf231869c38e1d635c974781357f6ac3de65fb79 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] Support building both 32- and 64-bit unit tests if we can target both architectures

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170549 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
8925b71d67f03065e1c3871c4474e91bcb88f999 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure Android unittests depend on ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170543 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
02dcc63dde3106c24999040768a5eb52f99fedda 19-Dec-2012 Alexey Samsonov <samsonov@google.com> Significantly change the way we build ASan unittests in CMake
build tree. Now just-built Clang is used to:
1) compile instrumented sources (as before);
2) compile non-instrumented sources;
3) compile our own instrumented version of googletest;
4) link it all together using -fsanitize=address flag
(instead of trying to copy linker behavior in
CMake build rules).

This makes ASan unittests pretty much self-consistent
and independent of other LLVM libraries.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170541 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
37a14418e494d3dfb27cd6bddcd9855df2c80ff5 19-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Change the boilerplate check in the libdispatch tests to fix them.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170531 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c333dffb81f1d85483d657c254c17f636ab192c5 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] more macro for conditional interception of pread functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170112 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
ada9ba14325df9e206f454c50bd1b55ea9ecdbb9 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Fix test expectations for strcat/strncat.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169987 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
ef8dfd8dffbf4385baf24e5aaea6c2cc7c6c936a 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Enhance OOB tests to check for access type (read or write).



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169974 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
6e6a7cfe0aac66eeefdf36dec78d7c536bff3c90 12-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix android build and lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169968 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
8530e2b953f0b34ecd267a6aba5f155d5c08c5c8 12-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169966 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
a390ece58317a25ef26866cef6753df4b06a3e65 11-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] make ThreadNamesTest more flexible

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169822 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
67f5c81639ab0ba0d7d9048b7206b424b577c90b 07-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix lint, remove debug prints

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169620 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
716e2f25123bf9b20fbc6b582803a3929b78b96d 07-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names (if non-empty) in asan reports

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169601 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
5a15541fc2bbe46a5ce0cd802b5c1055f2ffb14e 05-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] drop the extension from asan tests (as the extension may be different)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169392 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854 04-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169201 91177308-0d34-0410-b5e6-96231b3b80d8
san_test_utils.h
e2770623379f403ea8c0247cac9ce8c75167a886 03-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] EXPECT_EQ => ASSERT_EQ around pthread_create/pthread_join calls

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169121 91177308-0d34-0410-b5e6-96231b3b80d8
san_test_utils.h
2697687059e64a4f1319dc23a0a3ca59982d53f6 03-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] in asan tests, check all return values of pthread_create/pthread_join. Also add the ASAN_AVOID_EXPENSIVE_TESTS macro to guard the test that creates too many threads

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169118 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
san_test_config.h
san_test_utils.h
badab16503e025326a46a45da8faa6fd20e5fc3d 30-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] make asan_test.cc more gcc-friendly

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168992 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_config.h
san_test_utils.h
4cf06575e772d64907d4dc7d49f2ecc7830137f6 30-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] simplify break_optimization in tests (Jakub Jelinek)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168990 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_break_optimization.cc
san_test_utils.h
b989143d0be56496e8d5fcf75969af35a058792a 29-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] disable BuiltinLongJmpTest on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168872 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c3a5c173f228cbb15e332e6bbc17c76ebd55d7a8 29-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] enable BuiltinLongJmpTest

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168863 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
d3ca78fdb296d2a51fc224da673ebfff508acf44 28-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] add DISABLED_BuiltinLongJmpTest

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168793 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
bdec26d50b27e082d109acf99f7d713abc51435e 26-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] fix Android build by not calling GetPageSizeCached in a test (no need for the page size anyway)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168585 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
e89f1846d58550f919a0ef9081b11d4b0405019d 24-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168537 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
5af39e50366f1aacbebc284f572f08ad1ad07357 21-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
san_test_utils.h
f10a79a21002a38e6ebc4ed01dec31872f39aed6 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update compiler-rt tests to match flag renaming/deprecation in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167434 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f70848decb000cc0e4c05a27eed78865d2f38555 26-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166771 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
f8168925de9cd0758135d4084ce33e2843aae74f 19-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] add comment to blacklist file to test behavior introduced in r166283

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166284 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.ignore
7a89732b47eba572d5c27bd2ad846d99c87f574c 19-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] instrumented asan unit tests should depend on blacklist file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166282 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
de55be3899b994731ba2d9e168281d608dab3048 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] unit tests: Move main() to a separate file. Fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166104 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
san_test.cc
san_test_main.cc
fa7e95da75c30b7111224e68cb4405357bdc0f4b 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead of 'char* strchr(const char*, int)'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166101 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_utils.h
1cffef3e39cad4eb33606afbebac78d6637361ac 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166099 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_utils.h
68e8acab81a43ccf849add9272a761dc6b73ee8d 17-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] fix gcc warnings while building asan-rt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166093 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
ca9b5dd9922fb7f6e0ca06dbba7db7398b8997f1 15-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] fix more tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165934 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
866334332ff8c2a1b7f3715224614b6b75a7578c 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165008 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
7da8503a90c7f84787aa1ba978e2223893fa7727 28-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164821 91177308-0d34-0410-b5e6-96231b3b80d8
san_benchmarks_test.cc
san_noinst_test.cc
san_test.cc
san_test_config.h
san_test_utils.h
b0ddf227b25388ad836e560c00f0aec84026b0e5 19-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup: fix headers and lint warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164205 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals_test.cc
san_test.cc
58b017bb286a8f4413a9348d2c87c52de38cff6d 18-Sep-2012 Alexander Potapenko <glider@google.com> Intercept signal() and sigaction() within the dynamic runtime on Mac.
Add a test that ensures that ASan does not allow to override the signal handlers.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164118 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
78103db90782ca30593d7b1066b77792ca2f3459 14-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Remove some debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163881 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
ca2cdd989076d091d8c4d4c277f8b47d9b5903ad 12-Sep-2012 Alexander Potapenko <glider@google.com> Give more accurate malloc statistics to malloc_zone_statistics().

Fix a warning in macros instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163716 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
76e842845c927e92c2c21c41ac51e364fa17528c 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix compiler warnings for unit test on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163704 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_test.cc
b43d6a8ca10b9af8a903e8726003ae7767f9e823 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] first effort to start building ASan runtime with -Werror in CMake build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163686 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
34fc56c43f60be0b85a0e3ce30658fd98951f0b8 11-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> CMake build rules for ASan Android runtime and tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163613 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
e0e9eea99d7a81a15c4bb15ff2e5ebd92b50817b 06-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Use __ANDROID__ guard in asan_test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163313 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0f7d4a4ad69ad20053d8b78c611853e778bd465a 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the rest of flags/defs from old Makefile to CMake

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163204 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
656e4eef01b935e7d356e697e0f3ef4c99be2fbf 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add CMake support for building ASan benchmarks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163201 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5092682c3a6902e460a6e439cf48b3dc7d48dc65 30-Aug-2012 Alexey Samsonov <samsonov@google.com> Whitespace/lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162909 91177308-0d34-0410-b5e6-96231b3b80d8
san_test_utils.h
d865fecddccebf898ceed24d096fc58fb29a6e57 29-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Relocate the external headers provided by ASan and the common sanitizer
library.

These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.

I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.

I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.

The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:

<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...

But maybe others have different suggestions?

Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162822 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
60ab090deed8213613643729a7921ef0915ac704 29-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Some flag cleanup for the sanitizer runtimes.

This hoists most of the CFLAGS into a common variable. It also adds
detection for -Wno-c99-extensions and uses it to silence a pile of
warnings.

Finally, it switches to the proper flag -rdynamic.

With this, the cmake build is warning free on my bootstrap Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162809 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
8757a68c78f76fca32d3f2256fa70a7b550aa9e1 28-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] CMake build: share more compile flags between instrumented and non-instrumented tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162750 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c3390df6670cb166119b961eb27a033fb9073496 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] some renaming before we move StackTrace into sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162747 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
2c29212c42d457ade0bbd1d01de92195dd9ce925 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] improve SetErrorReportCallbackTest to actually catch missing functionality in __asan_set_error_report_callback

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162745 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
0aa04b3f432bc55e7c116d5280685ee3f243be8e 14-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] better diagnostics for mmap failure

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161874 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
f657a1977b6053c76ca8393f574da7593ea3ea12 13-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add __asan_set_on_error_callback() interface function that allows user to set a callback to be called right when ASan detects an error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161754 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
fe51abb4949ad9976168bf53edb52c20016b9a0d 10-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] CMake support for building ASan runtime as a universal binary on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161665 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
4afc63c18f7d811f31dbd2e5d825ce9d10c93dec 07-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add support for running unit tests by lit (as a part of 'make check-asan' command)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161406 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
37b3fcd6fdec5740fe51fc1315c5d4d54313de98 02-Aug-2012 Alexander Potapenko <glider@google.com> Make strcat() and strncat() more standard-compliant (check for invalid parameters even if zero bytes is copied, more accurate overlap check)
Fix the tests that were relying on the incorrect behavior.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161167 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
4d57f44ae53d766d77fd21ceee5f0b7e56429b04 25-Jul-2012 Alexey Samsonov <samsonov@google.com> cmake for compiler-rt: add a function to set output dirs for compiler runtimes equal to directory used by Clang driver. Use it for ASan runtime. Also, make sure that ASan unit tests depend on the ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160721 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
b831086e7c1e6004cf57594ec81b662f290dc2ac 25-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] don't return from a never-return function. fix a test that had a chain of bugs instead of just one

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160719 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
1a7741b4e3c50a986502507fa8055475dd0fa0d0 24-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Support for cmake build of ASan unittests in 32-bit LLVM build. Currently, to run ASan unit tests both for 32- and 64 bits one has to maintain two distinct LLVM builds. In a bright future, we'd like to use a single build for this

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160666 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_break_optimization.cc
san_noinst_test.cc
75b19ebf25af204cf209d108997272822241d6da 23-Jul-2012 Alexander Potapenko <glider@google.com> Intercept CFAllocator for each thread in the program.
Test that child threads use the ASan allocator, that allocated memory can be passed to another thread and deallocated on it.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=81


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160630 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.h
san_test.cc
63201b127e21d6fbfb6de62d0e44a5de01288153 23-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] minor fixes to silence cmake build warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160624 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
san_test.cc
79d12e87fbcc1b2342d76367b99b83adf9cbf499 23-Jul-2012 Alexander Potapenko <glider@google.com> For wild addresses in the shadow or shadow gap areas print an error message instead of crashing on a check.
Add AddressSanitizer.MemsetWildAddressTest that makes sure a proper error message is printed.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160620 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
dbd8aacc28bf631eb73f48611758b51e08e59f9a 29-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake unit tests: explicitly add necessary linker flags when linking unit tests with asan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159420 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2084543fc20ee58028bfab949f1502789199ff77 29-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake-based unit tests: merge instrumented and non-instrumented files into one test binary

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159419 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c9aeed824ebedb3b517826e648adcedc20103c46 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix the build - erase second main as we link all test sources together

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159348 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
d00ecb64892dcb03c5ae93a654da669b96753b01 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] silence various warnings in cmake build of asan unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159347 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_noinst_test.cc
37dd1d78906228d412caf05102106773dfa7222f 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake support for running asan unit tests on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159345 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_mac_test.mm
79753b2c945b590e9a60a2ac2d96c088f920a905 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] update cmake rules so that ASan unit tests can include googletest (and, hence, llvm) headers when they are built by fresh Clang

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159343 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
984f6cf119e26ec25463d58235d613bfea114127 27-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Add support for building the ASan instrumentation unit tests with the
just-built Clang binary, and linking them against the just-built ASan
runtime.

This is *very* brittle. I expect it will require tweaking, and I've
pro-actively disabled it on non-Unix builds and on cross-builds.

It is also currently missing dependency edges on GoogleTest header files
and a few other corner cases, but those can be fixed. This is the major
milestone of a mini-bootstrap-like build of the unittest.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159255 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
94cc7e121c3271693497367a0ebf35697840ad74 25-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] update the cmake file for asan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159143 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
bff533684731c89bd5e99d0cf950a86c21a342e8 25-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] move tests from asan_interface_test.cc to asan_noinst_test.cc. Now all these tests do not require instrumentation and work directly with asan rt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159135 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_noinst_test.cc
821f21b7cdd0bcc91102f08c8ee0773fd9273046 25-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Cleanup the handling of CFLAGS even more in the cmake build for ASan.
Add the initial support for building ASan tests.

The first change here is to try to get the CFLAGS to more closely match
those used by the old Makefile. There are probably still goofs here,
ASan folks, your review would be appreciated.

The second big change is to add support for building both
instrumentation based an non-instrumentation based unittests for ASan.
They are built a bit differently from how the old makefiles managed
things. Specifically, there are two binaries, one for the
non-instrumented case, and one for the instrumented case.

Also, the instrumented unit tests rely on the host compiler supporting
AddressSanitizer's intrumentation pass. This is kind-of gross, but
I don't know of a better way yet. I've mailed llvmdev to discuss this
issue.

One big caveat is that the detection logic currently doesn't work. I've
commented it out temporarily as I'd like to get feedback from the ASan
developers, etc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159134 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f4e8fc675ab52d0b3022847764a70ed7f03817bd 21-Jun-2012 Alexander Potapenko <glider@google.com> Small lint fix.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158922 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
43d03f3775677ca8e4727d49d1256de014351b95 21-Jun-2012 Alexander Potapenko <glider@google.com> Add a test for issue 81 -- AddressSanitizerMac.DISABLED_CFAllocatorDefaultDoubleFree_ChildPhread


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158921 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.h
san_mac_test.mm
san_test.cc
effd6bf516b7109460647253aa1a62046ca9bb7a 21-Jun-2012 Alexander Potapenko <glider@google.com> Enable AddressSanitizerMac.CFAllocatorDefaultDoubleFree and AddressSanitizerMac.CFAllocatorMallocDoubleFree, which now work fine.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158886 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
e205a9daec9ec4afed956cf5455889725b9192fb 21-Jun-2012 Alexander Potapenko <glider@google.com> Actually intercept free() to ensure that the deallocations caused by other functions directly calling it are routed to our allocator.
For the allocations that do not belong to any malloc zone check whether they're padded with a pointer to ASan's CFAllocator. If so, free the original (unpadded) pointer.
This should fix AddressSanitizerMac.NSURLDeallocation and issue 70.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158863 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
df42b619de6f7cbf23a68d91a924cfb44b9fd201 20-Jun-2012 Alexander Potapenko <glider@google.com> Add a test for NSURL deallocation (issue 70)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158843 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.h
san_mac_test.mm
san_test.cc
c1bdd5adca453f2fae238a4c53ade35ae60b85da 08-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] add interceptor for strncat

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158198 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
4b6eec3b3e1fd8ed26aa7ed684c16bc87f0ed625 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix GetFreeBytesTest interface test on 32-bit Linux - delete some assumptions about the behavior of allocator in test code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158047 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
e5f5895bda30f374b0b51412fd4d837fa59aed66 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Remove file-type tags for .cc files in ASan run-time library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157927 91177308-0d34-0410-b5e6-96231b3b80d8
san_benchmarks_test.cc
san_break_optimization.cc
san_globals_test.cc
san_interface_test.cc
san_noinst_test.cc
san_test.cc
ee3925515e4c7966f3ef489f687aa7e5692806a9 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
3f4c3875c42078e22c7e5356c5746fd18756d958 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
san_noinst_test.cc
e4d141dbbaf5185f332a185c22308340657d243e 22-May-2012 Kostya Serebryany <kcc@google.com> [asan] fix one test on 32-bit Mac 10.7; enable another test on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157237 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_test.cc
0796393f2088e3b75c4110934451160eeb037fab 23-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] fix asan issue #66 (correctly report type of the bug)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155344 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
4eaa17848ed02cae465f10aa5fe095e42dbf0d61 19-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] test for issue #66

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155127 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
73ac687e4bf9914dc7507ed18ef38cf326ef2175 10-Apr-2012 Alexander Potapenko <glider@google.com> 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: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154390 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
2dcf44991a8ec1ca7c8051eb27c5ff158530bdc3 09-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> Use 'typename' instead of 'class' in template<> definitions supporting POD types

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154314 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
8c9ccc655405dd8a41264fe7eb5f902700077d1a 30-Mar-2012 Alexander Potapenko <glider@google.com> Make sure NSObjects are allocated in a way that is visible to ASan.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153762 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.h
san_mac_test.mm
san_test.cc
847f932ab0405757946433b81d3b2952b306b0bc 29-Mar-2012 Alexey Samsonov <samsonov@google.com> [ASan] interceptors for atoi/atol/atoll

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153637 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
552c6702493cfcab356d3aa94becf50ff019838b 28-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153601 91177308-0d34-0410-b5e6-96231b3b80d8
san_racy_double_free_test.cc
44830c2f85f417bd486b49a53d97c640dd75728e 28-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] add racy double-free test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153586 91177308-0d34-0410-b5e6-96231b3b80d8
san_racy_double_free_test.cc
8f6a77f3f59ebc5f40f235e51836f468f30b9110 26-Mar-2012 Alexey Samsonov <samsonov@google.com> [ASan] add interceptor for strtol

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153444 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
84ba324b94d22a69acc823e845f9718fd2984e44 24-Mar-2012 Alexey Samsonov <samsonov@google.com> [ASan] add interceptor for strtoll

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153376 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
938106753364d96cedc11cbdc35a15030fb44d0c 23-Mar-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan/tests] Make 'noinline' and a bunch of other stuff portable

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153333 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_utils.h
f6607d097833cd53460735c1a5a2fd52b97613eb 23-Mar-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] replace '#if ... or ...' with '#if ... || ...'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153332 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
9b90e95d4dc59c6d97ed73b2470f5e21e7b346d5 21-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] extend the test for long double bug

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153190 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
cadaab1344c08b69fb3649bfb8a043bed5249145 16-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] disable GetOwnershipStressTest on non-linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152953 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
25c7178bf96d2316a3d9424b118d04bc51be1a9b 10-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] use O(log(N)) algorithm instead of O(N) in __asan_get_ownership

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152467 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
d364f87f81fda55d68a9e968bd314541c4272cde 09-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] add a (disabled) stress test for __asan_get_ownership

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152362 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
5b6eab9dc5572a66e3af54ab087255ffa4dd5185 02-Mar-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Add a negative test for memcpy of long double.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151888 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
3fe913558354f76707e2c5584559521399854b79 27-Feb-2012 Alexander Potapenko <glider@google.com> 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: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151528 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
8ae44ac678644265ba82a1b5696a402c9301a85c 27-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Replace some #ifdef(s) with plain if(s).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151526 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
6a3e6fd72e1e2322d28ced9d9c2adbd720e7fabf 17-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150802 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
788e1d704436065beb514fdde86070f61d0394ed 16-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Allocator tweaks for low memory systems.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150689 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
san_test_config.h
e1fe0fd868886b53cb8d5d957afebbdd47688df7 13-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] implement __asan_set_death_callback

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150414 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
7b7b55e99166511ce1e66bf6b79c46ae4aa60d17 13-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Add a missing return.

It is technically reachable on Android, where pthread_exit is not
marked noreturn.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150381 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
e3b8cdfe80489814260b884b0b9a86c823d39bd6 13-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: move output tests to a separate directory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150367 91177308-0d34-0410-b5e6-96231b3b80d8
lone_test.cc
lone_test.tmpl
eep_tail_call.cc
eep_tail_call.tmpl
lclose-test-so.cc
lclose-test.cc
lclose-test.tmpl
lobal-overflow.cc
lobal-overflow.tmpl
eap-overflow.cc
eap-overflow.tmpl
eap-overflow.tmpl.Darwin
arge_func_test.cc
arge_func_test.tmpl
atch_output.py
ull_deref.cc
ull_deref.tmpl
ull_deref.tmpl.Darwin
hared-lib-test-so.cc
hared-lib-test.cc
hared-lib-test.tmpl
tack-overflow.cc
tack-overflow.tmpl
tack-use-after-return.cc
tack-use-after-return.disabled
trncpy-overflow.cc
trncpy-overflow.tmpl
trncpy-overflow.tmpl.Darwin
est_output.sh
se-after-free.c
se-after-free.cc
se-after-free.tmpl
se-after-free.tmpl.Darwin
3755a33a60265400e8fba9efa3a605acc3bdd6d8 13-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: Use FileCheck instead of grep for pure C output tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150366 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
se-after-free.c
f54b1f9b73a6855d77ee270c282bd61407fa73a0 08-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] unpoison the stack before every noreturn call. Fixes asan issue 37. rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150101 91177308-0d34-0410-b5e6-96231b3b80d8
lone_test.cc
lone_test.tmpl
27f4932a8a0845303b33d69ddce096c445002e60 08-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] better warning messages for double-free bugs (provide allocation/deallocation stack traces)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150027 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
f58f998066db0231e521169d2f50af439ceecb49 07-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] make sure the AsanThread object is destroyed if pthread_exit is called

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149940 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0503ce8824393174c17acb26d62551f18a0fd82a 01-Feb-2012 Alexander Potapenko <glider@google.com> Disables testing memcpy() on Mac OS 10.7,
where memcpy() in fact aliases memmove() and thus calling it with
overlapping parameters is not an error.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149491 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
2a03ffece082439ea63331657c55248cbd0d15cf 31-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] tests should not require the asan-rt to be built with debug info

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149330 91177308-0d34-0410-b5e6-96231b3b80d8
eap-overflow.tmpl.Darwin
trncpy-overflow.tmpl.Darwin
se-after-free.tmpl.Darwin
cb00d134727c322e2f26298912f77e10be46aefe 31-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] new run-time flag: sleep_before_dying (asan Issue #31)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149306 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
c63a6c426842e0e9a24bd0ca954f7acb199fb537 31-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] re-enable the test for ObjC initialization bug

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149302 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.mm
d271c926e0fa1b8fa9e4ca13f49f7d3ee07a27bc 31-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] fix issue 35: don't let the optimizer to optimize the test code away.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149296 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.mm
san_test.cc
3be19f4fa3519e358fd41a5feda82c39a22ef107 30-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] add a test for __attribute__ no_address_safety_analysis

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149278 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0dfa6752c712c6467d46b21a0ca3431be9f47961 26-Jan-2012 Alexander Potapenko <glider@google.com> Darwin-specific templates for the output tests.
These should fix the output tests on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149068 91177308-0d34-0410-b5e6-96231b3b80d8
eap-overflow.tmpl.Darwin
ull_deref.tmpl.Darwin
trncpy-overflow.tmpl.Darwin
se-after-free.tmpl.Darwin
f4cea8f6f935c874b97669c7ca9819a224b78b48 24-Jan-2012 Alexander Potapenko <glider@google.com> Tune asan_symbolize.py to symbolize 64-bit binaries correctly.
Add the DEBUG flag to test_output.sh


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148798 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
b19cfb271ea10ae2fac68a9b74256ad746ca5e51 23-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] test that -fno-optimize-sibling-calls helps to get sane stack traces

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148714 91177308-0d34-0410-b5e6-96231b3b80d8
eep_tail_call.cc
eep_tail_call.tmpl
est_output.sh
431e51782d62d1257348e41e24da6b544fe70507 23-Jan-2012 Alexander Potapenko <glider@google.com> Wrap CFStringCreateCopy to prevent copying constant CF strings.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=10



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148696 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
fb506cb56c7f47a9f0aa515d6f5ca3ed6533422f 23-Jan-2012 Alexander Potapenko <glider@google.com> Add a test for CFStringCreateCopy.
Normally this function should not create copies of constant strings, but it does when the default CFAllocator
is replaced (e.g. under AddressSanitizer)

This test is related to http://code.google.com/p/address-sanitizer/issues/detail?id=10


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148695 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
ca2278dacaf75a6c45473d962a331181883df02c 18-Jan-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: return false instead of true for __asan_get_ownership(NULL)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148394 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
c655cfa8dc0fdf5b521e565f6cbdbf7981fba1b2 17-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] workaround for bug http://llvm.org/bugs/show_bug.cgi?id=11763. Do not bark on memcpy(a, a, size).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148318 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
6677def188c17ac63866146d72c4b1b652649fc6 17-Jan-2012 Alexey Samsonov <samsonov@google.com> Revert commit 148304

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148305 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_test.cc
c7cdcdacd485056c12efc368f7ea2a6db64831e8 17-Jan-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: from this patch, ASan allocator returns false for __asan_get_ownership(NULL) and produce error reports for malloc_usable_size(NULL) and __asan_get_allocated_size(NULL)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148304 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_test.cc
4fd95f141f78906570c15a8a3b4cf0a7b50a201d 17-Jan-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: add support for malloc_usable_size() function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148287 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_test.cc
4dd8ba8238b1b698953628affe6e5b2edf3b3e3f 16-Jan-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: fix recently introduced lint errors and broken test on Mac.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148235 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
7274eafceb832e1088f30b71652992787ba8c456 16-Jan-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Disable posix_memalign test on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148234 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
609dc28bb32bdba7533c191bcb88f358d0f42187 04-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] remove objdump-based tests in favour of much simpler LLVM-ish tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147514 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0ffe35c08475334243f760128c5b4b987e5a274b 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] enable memset/memcpy/memmove interceptors in asan-rt (in addition to those in the compiler module)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147319 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
c5e72a3b7c60f1b2d9d9be3a07d397d5b5f872be 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] better message for parameter overlap bugs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147317 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
0985ca240812ac5519168a6aecbccf4c513ae243 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] interceptor for strcat. Patch by samsonov@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147316 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
52fb238ccc45781e4e1d097ae1ee748c898b5825 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] interceptor for memcmp. Patch by samsonov@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147315 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
af0f01d77c2a495f023ffbf6cce85b33bbd2306d 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] interceptors for strcasecmp and strncasecmp. patch by samsonov@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147304 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
8547f6c368c964f0c3e60cf23383a42e5ba806cb 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] remove the test for cfree. 'man cfree' says: 'This function should never be used.' and this function is not found on many OSes we support.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147301 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
13ebae606b526399771e9cca1d6a9d24458ad0f1 27-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] rely on __has_feature(address_sanitizer) instead of the ADDRESS_SANITIZER macro

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147297 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
4df3f6690cb01a9925d61d9b33524af0b764b4be 27-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] make sure frame pointers are not omitted when running asan output tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147293 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
c37ca572876a585b6a910f14a85cc7ba7fc22f20 15-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] added a test to check that a global-buffer-overflow mentioned the module name; revert incorrect change in the test runner

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146701 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
est_output.sh
c491061eddb0bb7047470b2746cbcbfe7730b2a9 15-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] fix a bug (issue 19) where dlclose and the following mmap caused a false positive. run-time part.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146687 91177308-0d34-0410-b5e6-96231b3b80d8
lclose-test.tmpl
hared-lib-test.cc
est_output.sh
d11a9639388defed6a26dd5e76932246bbe505ef 15-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] regression test for asan issue 19, currently fails.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146681 91177308-0d34-0410-b5e6-96231b3b80d8
lclose-test-so.cc
lclose-test.cc
381b170aca88ed95f0521dd32e96496c0efd5693 14-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] fix the test runner to detect build breakages; add a test for -pie

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146528 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
c16201337a4bb974093ff75aa45682739a331d05 13-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] canonicalise the output for double-free and wrong-free. fixes asan issue 18

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146501 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
5009caa6e3063ce8343fa7b462ee778df02523e7 09-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] fix output test to not require debug symbols in asan run-time

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146212 91177308-0d34-0410-b5e6-96231b3b80d8
eap-overflow.tmpl
trncpy-overflow.tmpl
se-after-free.tmpl
918b18a849cea679bff31a4e0dfb3745302c240a 09-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] better test for use-after-return mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146203 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
acd5c617b219e0f059620c2a3928d2cc821d4534 07-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] fix the error message for 16-byte accesses (it previously printed 'unknown-crash')

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146075 91177308-0d34-0410-b5e6-96231b3b80d8
san_test.cc
96bdefaabcd9ed4cb3401f5fbfb51fd964e03f5a 06-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] GCD tests on Mac: prevent optimization and enable. Patch by glider@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145953 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac_test.mm
san_test.cc
0b4c09b313580cfed9e1f3a2dc2f383dc870caa3 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan]: test a pure C file with -faddress-sanitizer; lint fixes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145848 91177308-0d34-0410-b5e6-96231b3b80d8
san_exceptions_test.cc
est_output.sh
f45c19578801a33c8518ffc95ecb17d92f38c9eb 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] add the test for bug 11468

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145839 91177308-0d34-0410-b5e6-96231b3b80d8
san_exceptions_test.cc
30743140ff0f904b7f422b61d208e2837e7c631e 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] always collect malloc statstics (removed FLAG_stats)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145838 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_test.cc
san_noinst_test.cc
f48d64bb5739d3ce9e7940c619a33e1ca0bf6f98 03-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] micro-benchmark for use-after-return fake stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145739 91177308-0d34-0410-b5e6-96231b3b80d8
san_benchmarks_test.cc
b09f0aa7c724bb45483e98076127ef3df6376e36 30-Nov-2011 Kostya Serebryany <kcc@google.com> test asan at -O0

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145532 91177308-0d34-0410-b5e6-96231b3b80d8
est_output.sh
1e172b4bdec57329bf904f063a29f99cddf2d85f 30-Nov-2011 Kostya Serebryany <kcc@google.com> AddressSanitizer run-time library. Not yet integrated with the compiler-rt build system, but can be built using the old makefile. See details in README.txt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145463 91177308-0d34-0410-b5e6-96231b3b80d8
san_benchmarks_test.cc
san_break_optimization.cc
san_globals_test.cc
san_interface_test.cc
san_mac_test.h
san_mac_test.mm
san_noinst_test.cc
san_test.cc
san_test.ignore
san_test_config.h
san_test_utils.h
lobal-overflow.cc
lobal-overflow.tmpl
eap-overflow.cc
eap-overflow.tmpl
eap-overflow.tmpl.Darwin
arge_func_test.cc
arge_func_test.tmpl
atch_output.py
ull_deref.cc
ull_deref.tmpl
hared-lib-test-so.cc
hared-lib-test.cc
hared-lib-test.tmpl
tack-overflow.cc
tack-overflow.tmpl
tack-use-after-return.cc
tack-use-after-return.disabled
trncpy-overflow.cc
trncpy-overflow.tmpl
est_output.sh
se-after-free.c
se-after-free.cc
se-after-free.tmpl