Evgeniy Stepanov
0af672326a
[sanitizer] Replace more platform checks with SANITIZER_ constants.
...
llvm-svn: 177400
2013-03-19 14:33:38 +00:00
Evgeniy Stepanov
d3b56605f1
[sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.
...
llvm-svn: 177397
2013-03-19 13:54:41 +00:00
Alexander Potapenko
1eef2b813c
[ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
...
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)
llvm-svn: 166550
2012-10-24 09:35:23 +00:00
Alexander Potapenko
5109e3ef88
Commit a leftover file from r166026: Add MACOS_VERSION_MOUNTAIN_LION.
...
llvm-svn: 166028
2012-10-16 16:48:51 +00:00
Alexander Potapenko
20f9fcc285
Move the prototype of __CFInitialize to asan_mac.h so that asan_malloc_mac.cc may use it in the dynamic library mode.
...
llvm-svn: 161945
2012-08-15 12:23:36 +00:00
Alexander Potapenko
51e6488b31
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
llvm-svn: 160630
2012-07-23 14:07:58 +00:00
Alexander Potapenko
89f9270366
A portable way to check whether __CFInitialize has been called: compare kCFAllocatorSystemDefault._base._cfisa to 0.
...
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 on both Lion and Snow Leopard.
llvm-svn: 159821
2012-07-06 13:04:12 +00:00
Alexander Potapenko
d2ff0b087a
Do not check for __CFRuntimeClassTableSize on non-10.6 systems, where this symbol is private.
...
This change may cause http://code.google.com/p/address-sanitizer/issues/detail?id=87 to re-appear on Lion.
llvm-svn: 159819
2012-07-06 11:58:54 +00:00
Alexey Samsonov
5f7048b396
[asan]: remove asan_mac.h
...
llvm-svn: 153179
2012-03-21 12:29:54 +00:00
Alexey Samsonov
1d4145380e
[asan]: start removing os-specific asan_mac.h - move inclusion of mac system header to asan_mac.cc
...
llvm-svn: 153178
2012-03-21 12:03:44 +00:00
Alexey Samsonov
1479418407
[ASan] get rid of setjmp.h header in interceptors
...
llvm-svn: 153085
2012-03-20 11:40:09 +00:00
Alexey Samsonov
c298b3674f
[ASan]: remove GetMacosVersion from asan_mac.h header
...
llvm-svn: 153084
2012-03-20 10:54:40 +00:00
Alexey Samsonov
789456bf68
AddressSanitizer: Don't include GrandCentralDispatch headers in asan headers on Mac
...
llvm-svn: 151044
2012-02-21 08:30:57 +00:00
Alexey Samsonov
8489f2a564
AddressSanitizer: start factoring out interception machinery
...
llvm-svn: 150083
2012-02-08 19:52:01 +00:00
Alexey Samsonov
15965f9c3d
AddressSanitizer: Add macro for definition/declaration of interceptors
...
llvm-svn: 149602
2012-02-02 10:39:40 +00:00
Alexander Potapenko
81203bdb33
Implement GetMacosVersion() to obtain the OS X version at runtime.
...
llvm-svn: 149382
2012-01-31 13:19:18 +00:00
Alexander Potapenko
046ecc06be
Wrap CFStringCreateCopy to prevent copying constant CF strings.
...
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=10
llvm-svn: 148696
2012-01-23 10:09:54 +00:00
Alexey Samsonov
50bf956f29
AddressSanitizer: fix recently introduced lint errors and broken test on Mac.
...
llvm-svn: 148235
2012-01-16 12:38:09 +00:00
Alexander Potapenko
bd53f597de
This patch adds two methods, __asan_allocate_island and __asan_deallocate_island
...
and switches our interceptors to using them instead of the default
vm_allocate-based approach used by mach_override_ptr.
To simplify the code, a fixed memory mapping is used for the allocation pool --
note that we can't mmap an arbitrary chunk of memory, because the shadow memory hasn't been mapped yet
(for the reasons discussed in http://code.google.com/p/address-sanitizer/issues/detail?id=24 , we cannot map the shadow earlier)
The patch drops the program startup time from several second to half a second,
which speeds up the execution of ASan tests noticeably.
Because of the virtual memory size occupied by the programs it's hard
to speed up the shutdown time, which would've also helped the tests.
llvm-svn: 148116
2012-01-13 16:13:58 +00:00
Kostya Serebryany
5dfa4da0b9
[asan] flatten the asan-rt build slightly
...
llvm-svn: 145631
2011-12-01 21:40:52 +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