llvm-project/compiler-rt/lib/asan
Alexander Potapenko 13d95d5e5a Make compiler-rt/trunk/lib/asan compileable with g++.
Patch by Timur Iskhodzhanov (timurrrr@google.com)

The double-extern thing is
http://llvm.org/bugs/show_bug.cgi?id=11869

And the #include <string[s].h> are only needed on Mac (see comments in
the original code)
and also including them might make strchr/index conflict with the g++
system headers (which don't follow the man pages, ouch!)

llvm-svn: 149129
2012-01-27 10:52:37 +00:00
..
mach_override Add __asan_mach_override_ptr_custom, which allows to inject a custom memory allocator into mach_override_ptr(). 2012-01-13 15:31:37 +00:00
scripts More accurate atos execution which depends on the file type (EXECUTE, DYLIB) of the binary. 2012-01-26 17:06:50 +00:00
tests Darwin-specific templates for the output tests. 2012-01-26 17:40:18 +00:00
Makefile.mk Delete sysinfo/* and all references to it. 2012-01-18 11:42:30 +00:00
Makefile.old Delete sysinfo/* and all references to it. 2012-01-18 11:42:30 +00:00
README.txt Delete sysinfo/* and all references to it. 2012-01-18 11:42:30 +00:00
asan_allocator.cc AddressSanitizer: return false instead of true for __asan_get_ownership(NULL) 2012-01-18 15:26:55 +00:00
asan_allocator.h AddressSanitizer: add support for malloc_usable_size() function 2012-01-17 06:39:10 +00:00
asan_globals.cc [asan] fix a bug (issue 19) where dlclose and the following mmap caused a false positive. run-time part. 2011-12-15 21:55:34 +00:00
asan_interceptors.cc Make compiler-rt/trunk/lib/asan compileable with g++. 2012-01-27 10:52:37 +00:00
asan_interceptors.h [asan] use internal_strcmp before asan_init is done. *may* fix asan issue #30 2012-01-23 21:20:05 +00:00
asan_interface.h AddressSanitizer: return false instead of true for __asan_get_ownership(NULL) 2012-01-18 15:26:55 +00:00
asan_internal.h Make compiler-rt/trunk/lib/asan compileable with g++. 2012-01-27 10:52:37 +00:00
asan_linux.cc EHABI-based stack trace on ARM. 2012-01-19 11:34:18 +00:00
asan_lock.h [asan] move OS-dependent code away from asan_lock.h 2012-01-10 21:24:40 +00:00
asan_mac.cc Fix a bug in AsanProcMaps on Mac: on 64 bits the program was trying to read twice as many segment load commands as the binary actually contained. 2012-01-26 17:01:20 +00:00
asan_mac.h Wrap CFStringCreateCopy to prevent copying constant CF strings. 2012-01-23 10:09:54 +00:00
asan_malloc_linux.cc AddressSanitizer: add support for malloc_usable_size() function 2012-01-17 06:39:10 +00:00
asan_malloc_mac.cc AddressSanitizer: add support for malloc_usable_size() function 2012-01-17 06:39:10 +00:00
asan_mapping.h Refactor shadow poisoning done by asan-rt, no funtionality changes; patch by samsonov@google.com 2011-11-30 18:50:23 +00:00
asan_poisoning.cc [asan] minimize the use of STL. One bit is still left. 2011-12-02 18:42:04 +00:00
asan_posix.cc EHABI-based stack trace on ARM. 2012-01-19 11:34:18 +00:00
asan_printf.cc [asan] don't include unistd.h in the headers 2012-01-09 23:11:26 +00:00
asan_procmaps.h Fix a bug in AsanProcMaps on Mac: on 64 bits the program was trying to read twice as many segment load commands as the binary actually contained. 2012-01-26 17:01:20 +00:00
asan_rtl.cc EHABI-based stack trace on ARM. 2012-01-19 11:34:18 +00:00
asan_stack.cc EHABI-based stack trace on ARM. 2012-01-19 11:34:18 +00:00
asan_stack.h EHABI-based stack trace on ARM. 2012-01-19 11:34:18 +00:00
asan_stats.cc [asan] always collect malloc statstics (removed FLAG_stats) 2011-12-05 19:17:53 +00:00
asan_stats.h 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 2011-11-30 01:07:02 +00:00
asan_thread.cc AddressSanitizer: create AsanThreadSummary together with AsanThread (in parent thread) 2012-01-17 06:35:31 +00:00
asan_thread.h AddressSanitizer: create AsanThreadSummary together with AsanThread (in parent thread) 2012-01-17 06:35:31 +00:00
asan_thread_registry.cc Make the Android TSD workaround more reliable. 2012-01-19 13:57:45 +00:00
asan_thread_registry.h AddressSanitizer: create AsanThreadSummary together with AsanThread (in parent thread) 2012-01-17 06:35:31 +00:00

README.txt

AddressSanitizer RT
================================
This directory contains sources of the AddressSanitizer (asan) run-time library.
We are in the process of integrating AddressSanitizer with LLVM, stay tuned.

Directory structre:

README.txt       : This file.
Makefile.mk      : Currently a stub for a proper makefile. not usable.
Makefile.old     : Old out-of-tree makefile, the only usable one so far.
asan_*.{cc,h}    : Sources of the asan run-time lirbary.
mach_override/*  : Utility to override functions on Darwin (MIT License).
scripts/*        : Helper scripts.

Temporary build instructions (verified on linux):

cd lib/asan
make -f Makefile.old get_third_party  # gets googletest and cpplint
make -f Makefile.old test -j 8 CLANG_BUILD=/path/to/Release+Asserts
# Optional:
# make -f Makefile.old install # installs clang and rt to lib/asan_clang_linux

For more info see http://code.google.com/p/address-sanitizer/