Richard Relph
27cfe1c1b5
Clean up some warnings that become errors. Seen in Xcode.
...
llvm-svn: 170843
2012-12-21 05:17:13 +00:00
Dmitry Vyukov
2547ac65eb
tsan: java interface implementation skeleton
...
llvm-svn: 170707
2012-12-20 17:29:34 +00:00
Alexey Samsonov
19e8b7ecba
[ASan] remove duplicate entry in shadow byte legend
...
llvm-svn: 170701
2012-12-20 15:19:10 +00:00
Alexey Samsonov
aef6b78bcb
[Sanitizer] Fix CMake build rules for sanitizer_common tests to respect universal static libraries on Mac
...
llvm-svn: 170698
2012-12-20 14:38:02 +00:00
Kostya Serebryany
c0d8ca5537
[asan] asan_allocator2: implement memalign
...
llvm-svn: 170697
2012-12-20 14:35:06 +00:00
Evgeniy Stepanov
e243708d6b
[*san] Create unittests output directory, if it does not exist.
...
llvm-svn: 170696
2012-12-20 14:34:09 +00:00
Dmitry Vyukov
7b838ada82
tsan: add cmake build and tests into presubmit script
...
llvm-svn: 170695
2012-12-20 14:10:27 +00:00
Alexey Samsonov
01674dfc8f
[Sanitizer] Modify CMake build rules for sanitizer_common unit tests: build them with fresh Clang for both 32- and 64-bits (if possible)
...
llvm-svn: 170691
2012-12-20 13:24:21 +00:00
Alexander Potapenko
5e9e51874e
[ASan] Make the FileCheck pattern more c++filt-resistant.
...
This test didn't pass for me locally because of "T0's stack" being converted to "T0'short stack" by c++filt.
Strange enough this doesn't show up on our bots.
llvm-svn: 170690
2012-12-20 13:17:49 +00:00
Kostya Serebryany
54c6086e9c
[tsan] fix cmake build
...
llvm-svn: 170689
2012-12-20 12:26:09 +00:00
Kostya Serebryany
8627af3779
[asan] add memalign tests
...
llvm-svn: 170687
2012-12-20 12:11:52 +00:00
Kostya Serebryany
9da3dd0415
[asan] add a flag poison_heap to allow better allocator benchmarking, implemenet malloc_stats() on Linux
...
llvm-svn: 170685
2012-12-20 11:54:21 +00:00
Dmitry Vyukov
d088b3b219
tsan: add java interface implementation stub
...
llvm-svn: 170681
2012-12-20 10:21:30 +00:00
Kostya Serebryany
ab8d33184d
[asan] asan_allocator2: make all remaining tests pass.
...
llvm-svn: 170680
2012-12-20 08:53:41 +00:00
Dmitry Vyukov
5a0761ed3c
tsan: add Java interface
...
llvm-svn: 170679
2012-12-20 07:47:04 +00:00
Kostya Serebryany
f855bbc2f3
[asan] add ASAN_PCRE_DOTALL to two new multi-line regexps
...
llvm-svn: 170677
2012-12-20 07:26:33 +00:00
Alexey Samsonov
74cbc4ccd7
[ASan] don't use -fsanitize=address linker flag for unit tests on Android
...
llvm-svn: 170670
2012-12-20 06:16:50 +00:00
Richard Smith
64e25ce53d
Move C++ name demangling support from ubsan into sanitizer_common.
...
llvm-svn: 170666
2012-12-20 05:00:13 +00:00
Alexey Samsonov
826b324cb0
[ASan] explicitly link with dynamic ASan runtime when building unittests on Android
...
llvm-svn: 170552
2012-12-19 15:52:30 +00:00
Alexey Samsonov
85bd73d259
[ASan] Support building both 32- and 64-bit unit tests if we can target both architectures
...
llvm-svn: 170549
2012-12-19 15:17:23 +00:00
Kostya Serebryany
dcdeecb257
[asan] asan_allocator2: add mmap/munmap stats
...
llvm-svn: 170548
2012-12-19 14:56:38 +00:00
Alexey Samsonov
b29d37bea5
[ASan] make sure Android unittests depend on ASan runtime
...
llvm-svn: 170543
2012-12-19 13:46:58 +00:00
Alexey Samsonov
ca7fcf2354
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.
llvm-svn: 170541
2012-12-19 12:33:39 +00:00
Alexander Potapenko
7e1fcb8136
[ASan] Change the boilerplate check in the libdispatch tests to fix them.
...
llvm-svn: 170531
2012-12-19 11:26:41 +00:00
Kostya Serebryany
d5c46cb2f7
[asan] print the shadow bytes in different colors and also output the shadow byte legend
...
llvm-svn: 170520
2012-12-19 09:53:32 +00:00
Alexey Samsonov
d12943e028
[TSan] build only gtest-all.o when building TSan unit tests
...
llvm-svn: 170519
2012-12-19 09:19:57 +00:00
Dmitry Vyukov
1ed72076b4
tsan: add lint check back into presubmit script
...
llvm-svn: 170515
2012-12-19 08:53:31 +00:00
Alexey Samsonov
35ed02ebf1
[Sanitizer] add missing header on Windows
...
llvm-svn: 170514
2012-12-19 08:51:39 +00:00
Kostya Serebryany
479f05b276
[asan] asan_allocator2: improve FindHeapChunkByAddress to find memory chunks to the left of a given address. Almost all tests pass with the new allocator now, only 6 are left to fix.
...
llvm-svn: 170511
2012-12-19 08:32:50 +00:00
Alexey Samsonov
b6219c060b
[Sanitizer] implement internal_isatty on Windows
...
llvm-svn: 170507
2012-12-19 07:57:42 +00:00
Dmitry Vyukov
c467933dc7
tsan: fix -Wgnu warnings
...
llvm-svn: 170499
2012-12-19 06:59:45 +00:00
Kostya Serebryany
2abbce6701
[sanitizer] one more stability fix in 64-bit allocator
...
llvm-svn: 170498
2012-12-19 06:51:45 +00:00
Kostya Serebryany
12676268fa
[sanitizer] fix LargeMmapAllocator::GetBlockBegin
...
llvm-svn: 170434
2012-12-18 14:56:38 +00:00
Dmitry Vyukov
44e1beaee6
tsan: intercept fork() to prevent false race reports on fd's
...
llvm-svn: 170433
2012-12-18 14:44:44 +00:00
Dmitry Vyukov
a2ce1e0055
tsan: warn about reports from signal handlers
...
llvm-svn: 170430
2012-12-18 14:19:24 +00:00
Dmitry Vyukov
d509179a0b
tsan: add signalfd() and inotify_init() interceptors
...
llvm-svn: 170429
2012-12-18 12:35:31 +00:00
Dmitry Vyukov
42230ae216
tsan: add io_sync flag that controls amount of IO synchronization
...
llvm-svn: 170427
2012-12-18 12:20:55 +00:00
Dmitry Vyukov
9c7bcfea6f
tsan: remove TSAN_OPTIONS from the script
...
The runtime skips atexit sleep if there are no threads now,
so it must be fast w/o it.
Allows to specify own TSAN_OPTIONS for the tests.
llvm-svn: 170426
2012-12-18 12:19:50 +00:00
Alexey Samsonov
f37c45c20d
[Sanitizer] Expose StackTrace::GetPreviousInstructionPc() to get PC of call instruction from return address
...
llvm-svn: 170424
2012-12-18 09:57:34 +00:00
Richard Smith
7e45562ad0
ubsan: Demangle class names, and be more informative when a reinterpret_cast
...
has got us to the wrong offset within an object.
llvm-svn: 170423
2012-12-18 09:30:21 +00:00
Kostya Serebryany
bad01549b6
[asan] add some colors to asan output if printing to tty (following ubsan)
...
llvm-svn: 170418
2012-12-18 07:32:16 +00:00
Dmitry Vyukov
6d315cbcc3
tsan: describe "file descriptor" location
...
llvm-svn: 170417
2012-12-18 06:57:34 +00:00
Richard Smith
cf56ebd52a
ubsan: When diagnosing something wrong somewhere in memory, emit a note
...
pointing at the bad location and a snippet of nearby memory values. This is
strictly best-effort; reading these bytes to display the note could lead to a
seg fault, and that's explicitly OK.
llvm-svn: 170415
2012-12-18 06:30:32 +00:00
Richard Smith
54fc2370f9
Don't escape %s in printf usage message; it's not written by printf.
...
llvm-svn: 170413
2012-12-18 05:49:49 +00:00
Richard Smith
52987120f9
ubsan: if the frontend didn't provide us with a source location, try to work
...
one out from the return address. Currently, we can only resolve this address to
a file and line number if we have an external symbolizer.
llvm-svn: 170407
2012-12-18 04:23:18 +00:00
Richard Smith
37a913ae8f
Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a reference
...
to an object outside its lifetime does not have undefined behavior.
llvm-svn: 170388
2012-12-18 00:23:12 +00:00
Dmitry Vyukov
09b0dbfaf9
tsan: say what thread had created a thread in reports
...
llvm-svn: 170346
2012-12-17 16:28:15 +00:00
Kostya Serebryany
d6aec5a8e0
[asan] asan_allocator2: implement malloc_usable_size and fix 32-bit
...
llvm-svn: 170339
2012-12-17 14:57:25 +00:00
Kostya Serebryany
ec339f70d6
[asan] asan_allocator2: don't use TLS and fix calloc
...
llvm-svn: 170329
2012-12-17 13:43:47 +00:00
Kostya Serebryany
1aae0e67fa
[asan] asan_alocator2: implement quarantine and Reallocate
...
llvm-svn: 170315
2012-12-17 09:06:25 +00:00