Alexander Potapenko
7e07f56811
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.
llvm-svn: 151528
2012-02-27 14:06:48 +00:00
Alexey Samsonov
0d0b406aba
AddressSanitizer: use custom strtol/atoll functions
...
llvm-svn: 150812
2012-02-17 16:15:09 +00:00
Alexey Samsonov
fbb50f19ad
AddressSanitizer: revert r150683 - we can't get rid of headers that easily
...
llvm-svn: 150699
2012-02-16 17:00:45 +00:00
Alexey Samsonov
ca37969c24
AddressSanitizer: don't include pthread.h and signal.h in interceptors on Mac
...
llvm-svn: 150683
2012-02-16 11:26:52 +00:00
Timur Iskhodzhanov
d2a9075de0
[ASan] Define an internal implementation of strchr to make stack OOB tests pass on Windows
...
llvm-svn: 150499
2012-02-14 19:33:04 +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
Alexey Samsonov
2dcef2d2a8
AddressSanitizer: Enforce default visibility for all libc interceptors
...
llvm-svn: 149247
2012-01-30 13:42:44 +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
Kostya Serebryany
586ade114b
[asan] use internal_strcmp before asan_init is done. *may* fix asan issue #30
...
llvm-svn: 148726
2012-01-23 21:20:05 +00:00
Kostya Serebryany
0c8fa7b8ed
[asan] remove OS-dependent includes from asan_interceptors.h
...
llvm-svn: 147916
2012-01-11 02:32:40 +00:00
Kostya Serebryany
65518014e2
[asan] don't use strstr/strncat from libc, use our own versions instead
...
llvm-svn: 147807
2012-01-09 22:20:49 +00:00
Kostya Serebryany
ba41e8d2c5
[asan]: fix mac build
...
llvm-svn: 147792
2012-01-09 19:35:11 +00:00
Kostya Serebryany
9fd01e5ea5
[asan] refactoring: move all interceptors to a single file
...
llvm-svn: 147784
2012-01-09 18:53:15 +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
50bc2a71b2
[asan] interceptor for strcat. Patch by samsonov@google.com
...
llvm-svn: 147316
2011-12-28 19:08:49 +00:00
Kostya Serebryany
6579e355c0
[asan] interceptor for memcmp. Patch by samsonov@google.com
...
llvm-svn: 147315
2011-12-28 18:56:42 +00:00
Kostya Serebryany
809632e28e
[asan] interceptors for strcasecmp and strncasecmp. patch by samsonov@google.com
...
llvm-svn: 147304
2011-12-28 02:24:50 +00:00
Kostya Serebryany
8b981c2564
The code instrumented with ASan may have its own instance of the
...
mach_override library.
In this case chances are that functions from it will be called from
mach_override_ptr() during ASan initialization.
This may lead to crashes (if those functions are instrumented) or
incorrect behavior (if the implementations differ).
The attached patch renames mach_override_ptr() into
__asan_mach_override_ptr() and makes the rest of the mach_override
internals hidden.
The corresponding AddressSanitizer bug is
http://code.google.com/p/address-sanitizer/issues/detail?id=22
Patch by glider@google.com
llvm-svn: 147303
2011-12-28 01:08:14 +00:00
Kostya Serebryany
93927f9e01
[asan] don't require __cxa_throw to be present in the process. This is the last dependency on libstdc++
...
llvm-svn: 145821
2011-12-05 17:56:32 +00:00
Kostya Serebryany
9d1eee9e2a
fix asan-rt build on Mac. Patch by glider@google.com
...
llvm-svn: 145496
2011-11-30 17:33:13 +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