Kostya Serebryany
00e22d2b2c
[asan] more compaction for allocator
...
llvm-svn: 158076
2012-06-06 15:30:55 +00:00
Kostya Serebryany
79437fe376
[asan] make tid u32 instead of int
...
llvm-svn: 158074
2012-06-06 15:06:58 +00:00
Kostya Serebryany
53b74ac256
[asan] start compacting the allocator header, the goal is to make it 16 bytes w/o losing any information
...
llvm-svn: 158072
2012-06-06 14:46:38 +00:00
Alexey Samsonov
51ae983718
[Sanitizer]: Introduce a common internal printf function. For now, also use tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms).
...
llvm-svn: 158065
2012-06-06 13:11:29 +00:00
Alexey Samsonov
461820ad67
[ASan] Make printf arguments match format strings better.
...
llvm-svn: 158059
2012-06-06 10:46:00 +00:00
Alexey Samsonov
485d3dc363
Remove file-type tags for .cc files in ASan run-time library
...
llvm-svn: 157927
2012-06-04 13:50:10 +00:00
Kostya Serebryany
1d35d155fd
[asan] more renaming
...
llvm-svn: 157747
2012-05-31 15:02:07 +00:00
Kostya Serebryany
8d03204204
[asan] more renaming
...
llvm-svn: 157746
2012-05-31 14:35:53 +00:00
Kostya Serebryany
1b71207f48
[asan,tsan] introduce sanitizer_common/sanitizer_defs.h and perform some renaming in asan rt. More to come.
...
llvm-svn: 157743
2012-05-31 14:11:07 +00:00
Alexander Potapenko
442002568c
Introduce the check_malloc_usable_size flag (on by default).
...
When the flag is set to zero, we do not check for errors in malloc_usable_size.
This may be useful to work around a bug in Nvidia drivers prior to 295.*
llvm-svn: 157472
2012-05-25 15:20:13 +00:00
Timur Iskhodzhanov
ea365131a2
[ASan] Make for-Windows RTL compileable using Clang++
...
llvm-svn: 157188
2012-05-21 14:25:36 +00:00
Kostya Serebryany
c5bf3ad922
[asan] fix asan issue #66 (correctly report type of the bug)
...
llvm-svn: 155344
2012-04-23 10:08:16 +00:00
Kostya Serebryany
7a8f5e4d1e
[asan] make __asan::Deallocate immune to racy double-free (issue #57 )
...
llvm-svn: 154097
2012-04-05 15:55:09 +00:00
Alexander Potapenko
8418de1689
Log the allocator messages at a higher verbosity level.
...
llvm-svn: 153514
2012-03-27 16:37:16 +00:00
Evgeniy Stepanov
823085a8f4
[asan] Support for %z to Printf()
...
At the moment, asan internal Printf() uses %l modifier for printing
values of size_t and related types. This works, because we control
both the implementation of Printf and all its uses, but can be a
little misleading.
This change adds support for %z to Printf(). All callers that print
sizes and pointers as integers are switched to %zu / %zx.
llvm-svn: 153177
2012-03-21 11:32:46 +00:00
Alexey Samsonov
8b5f7c5aa2
AddressSanitizer: fix a couple of typos
...
llvm-svn: 152617
2012-03-13 06:46:32 +00:00
Kostya Serebryany
b0f9354168
[asan] use O(log(N)) algorithm instead of O(N) in __asan_get_ownership
...
llvm-svn: 152467
2012-03-10 01:30:01 +00:00
Evgeniy Stepanov
d84e16e6a3
Replace some #ifdef(s) with plain if(s).
...
llvm-svn: 151526
2012-02-27 13:07:29 +00:00
Alexey Samsonov
a1a3a2ffc3
AddressSanitizer: add some checks to AsanChunkFifoList::PushList
...
llvm-svn: 151521
2012-02-27 09:06:10 +00:00
Timur Iskhodzhanov
f2061453bd
[ASan] Remove one FIXME - re-enable "free-not-malloced" reports on Windows
...
llvm-svn: 151051
2012-02-21 09:58:39 +00:00
Alexey Samsonov
8e7bfceb98
AddressSanitizer: fix lint
...
llvm-svn: 150802
2012-02-17 08:31:10 +00:00
Evgeniy Stepanov
5d47e9164c
[asan] Allocator tweaks for low memory systems.
...
llvm-svn: 150689
2012-02-16 13:35:11 +00:00
Timur Iskhodzhanov
7ce3e5bb8e
[asan] The first version of the RTL for Windows, reviewed at http://codereview.appspot.com/5647052
...
llvm-svn: 150185
2012-02-09 17:20:14 +00:00
Alexey Samsonov
e725478e2f
AddressSanitizer: replace all "real_X" calls with "REAL(X)"
...
llvm-svn: 150073
2012-02-08 13:45:31 +00:00
Kostya Serebryany
9716914b2d
[asan] better warning messages for double-free bugs (provide allocation/deallocation stack traces)
...
llvm-svn: 150027
2012-02-08 00:42:29 +00:00
Alexey Samsonov
f9fef3d275
AddressSanitizer: simplify RoundUpToPowerOfTwo/clz; add a couple of CHECKs for real_X calls. Patch by timurrrr@google.com
...
llvm-svn: 149687
2012-02-03 08:50:16 +00:00
Kostya Serebryany
510850c345
[asan] minor ifdef cleanup
...
llvm-svn: 149274
2012-01-30 20:55:02 +00:00
Alexander Potapenko
f519564d7c
Make compiler-rt/trunk/lib/asan compileable with Visual Studio 2008 on Windows.
...
Patch by Timur Iskhodzhanov (timurrrr@google.com )
To test:
$ cl /c *.c*
in the asan directory.
The code fails to link if you omit the "/c" part but that's one of the
next steps,
as well as a few TODO's I've put into the Windows-specific code.
llvm-svn: 149130
2012-01-27 15:15:04 +00:00
Alexey Samsonov
0ac73fc9f8
AddressSanitizer: return false instead of true for __asan_get_ownership(NULL)
...
llvm-svn: 148394
2012-01-18 15:26:55 +00:00
Alexey Samsonov
67d508d083
Revert commit 148304
...
llvm-svn: 148305
2012-01-17 14:01:15 +00:00
Alexey Samsonov
1e310295d0
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)
...
llvm-svn: 148304
2012-01-17 13:31:54 +00:00
Alexey Samsonov
209c514a1d
AddressSanitizer: add support for malloc_usable_size() function
...
llvm-svn: 148287
2012-01-17 06:39:10 +00:00
Kostya Serebryany
2b08718bba
[asan] move more stuff to OS-specific files
...
llvm-svn: 147647
2012-01-06 02:12:25 +00:00
Kostya Serebryany
a772096156
[asan] refactoring: don't #include <sys/mman.h> in non-os-specific files
...
llvm-svn: 147328
2011-12-28 23:28:54 +00:00
Kostya Serebryany
6c4bd806fa
[asan] use custom libc-free getenv; a bit of refactoring around mmap calls
...
llvm-svn: 147326
2011-12-28 22:58:01 +00:00
Kostya Serebryany
d47a91ad2a
[asan] canonicalise the output for double-free and wrong-free. fixes asan issue 18
...
llvm-svn: 146501
2011-12-13 19:16:36 +00:00
Kostya Serebryany
72fde3727e
[asan] make use-after-return mode more robust: allow to call instrumented functions while reporting an error
...
llvm-svn: 146231
2011-12-09 01:49:31 +00:00
Kostya Serebryany
49a182fa12
[asan] always collect malloc statstics (removed FLAG_stats)
...
llvm-svn: 145838
2011-12-05 19:17:53 +00:00
Kostya Serebryany
2d27cdf621
[asan] minimize the use of STL. One bit is still left.
...
llvm-svn: 145691
2011-12-02 18:42:04 +00:00
Daniel Dunbar
4e3a11ba57
lib/asan: Fix possible type mismatches.
...
llvm-svn: 145664
2011-12-02 01:36:38 +00:00
Kostya Serebryany
15dd3f2500
Refactor shadow poisoning done by asan-rt, no funtionality changes; patch by samsonov@google.com
...
llvm-svn: 145505
2011-11-30 18:50:23 +00:00
Kostya Serebryany
019b76f5fd
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
...
llvm-svn: 145463
2011-11-30 01:07:02 +00:00