History log of /external/compiler-rt/lib/asan/asan_rtl.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d71de26cedae3dafc17449fe0182045c0bd20e8 21-Jul-2014 Stephen Hines <srhines@google.com> Update compiler-rt for rebase to r212749.

Includes a cherry-pick of:
r213309 - fixes umodsi3

Change-Id: Ic7367e3586b6af7ef74bee6a8cf437d5f28d975a
/external/compiler-rt/lib/asan/asan_rtl.cc
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
/external/compiler-rt/lib/asan/asan_rtl.cc
dbd69cc9ccda50efd0305cd0ce9bad50defe4b42 15-Nov-2013 Bob Wilson <bob.wilson@apple.com> Reapply asan coverage changes 194702-194704.

I still don't know what is causing our bootstrapped LTO buildbots to fail,
but llvm r194701 seems to be OK and I can't imagine that these changes could
cause the problem.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ae51c273d55fa172908cf940c238eacec0f73223 15-Nov-2013 Bob Wilson <bob.wilson@apple.com> Speculatively revert asan coverage changes 194702-194704.

Apple's bootstrapped LTO builds have been failing, and these changes (along
with llvm 194701) are the only things on the blamelist. I will either reapply
these changes or help debug the problem, depending on whether this fixes the
buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
68e16eb59c7f654cdb98a2811b3a42612b58a735 14-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] Poor man's coverage that works with ASan (compiler-rt part)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
55c7947a742aa72530eef52d902e60e5571ac3cf 12-Nov-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Specify a default value for each common runtime flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e9e2b7f964413dccf4c724eb9ca39d2686cc29d4 06-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Disable back init-order checker. Make strict_init_order imply check_initialization_order

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7f80655d8283dbdf77bfee4a849eed4d59e95c7a 01-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Kill use_stack_depot runtime flag and stack trace compression routines.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6f5427b0ebc5ced4497f8ef00bd19fc0bd6c33b7 31-Oct-2013 Alexey Samsonov <samsonov@google.com> [ASan] Turn on (non-strict) initialization order checker by default for all ASan users

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c1a1ed62228288155459d39194995a36aca4a8a6 26-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Overhaul the symbolizer interface.

This moves away from creating the symbolizer object and initializing the
external symbolizer as separate steps. Those steps now always take place
together.

Sanitizers with a legacy requirement to specify their own symbolizer path
should use InitSymbolizer to initialize the symbolizer with the desired
path, and GetSymbolizer to access the symbolizer. Sanitizers with no
such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for
initialization.

The symbolizer interface has been made thread-safe (as far as I can
tell) by protecting its member functions with mutexes.

Finally, the symbolizer interface no longer relies on weak externals, the
introduction of which was probably a mistake on my part.

Differential Revision: http://llvm-reviews.chandlerc.com/D1985

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a2e70d92b67703effb631d7b4db8979fd74d5db5 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix atexit stats

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
13521a267f509a06e92baa154947b9d2cde0eed8 17-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
cca8e781e5353cba810a0ec3a814ddde2c4934e7 16-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag 'poison_partial'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6866dba92ac842fc513ba339ba849a953ffb7507 15-Oct-2013 Dmitry Vyukov <dvyukov@google.com> tsan: move verbosity flag to CommonFlags



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e86e35fbe861e73c5991200510a028877427b3e7 14-Oct-2013 Sergey Matveev <earthdok@google.com> [asan] Improve thread lifetime tracking on POSIX systems.

Call AsanThread::Destroy() from a late-running TSD destructor.
Previously we called it before any user-registered TSD destructors, which caused
false positives in LeakSanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e1c68c319a0113be832da17a777892353a8b5f23 27-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b0796022fb8f47939696b2e57c17e1603eda1f9d 23-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] disable the detect_stack_use_after_return run-time flag by default and enable it explicitly in tests. This is done in preparation to enabling the -fsanitize=use-after-return compile-time flag by default when -fsanitize=address is present.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
230e52f4e91b53f05ce19dbbf11047f4a0113483 18-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a run-time option detect_stack_use_after_return, add verbosity output for fake stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
22e21b044c9337a2fa921f268b7d221c693ad78b 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Check that getSymbolizer() is defined. Turn magic mapping constants into named variables

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
89de457bd3ec40d38bc7860f88f1d4da473eacc4 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a test for use-after-return and exceptions and fix it. Not 100% sure this is a complete fix, will keep looking for harder cases.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7847d77b246635211c3bf465421d49d7af5226c1 10-Sep-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Refactor symbolization interface: use class instead of several functions. Move some code around to get rid of extra source files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
34e3ed1db94c5ce9784d7ffb8d66a54cf523e09c 10-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
68c016aea0b61f649b9d9ba65c7d7217e0c0f6cb 03-Sep-2013 Alexey Samsonov <samsonov@google.com> ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a0e78c9dbd9cc27aebf765cc69a1158df5a05bb9 16-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/RTL] Disable alloc_dealloc_mismatch by default on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3c80c6c574850106481f82b9e23d1c728458d4a9 13-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
41f15402521b7af66c2aa8e0ad4a056fc8166dd9 01-Aug-2013 Sergey Matveev <earthdok@google.com> [lsan] Add leak_check_at_exit flag.

We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
62519eb72ec1005d794685c1ec09df7c37631b27 22-Jul-2013 Sergey Matveev <earthdok@google.com> [lsan] Make __lsan_do_leak_check() honor the detect_leaks flag.

Also move detect_leaks to common flags.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
bb7f2d880c843dd5ee1c5e53d2517f7ca9058e66 16-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Use less shadow on Win 32-bit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b6246066a271e3b01732d1b4381ef745152747d2 25-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Move log_path to common flag and use it in MSan.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
d64bcf43935c9ceeb7376ca4185662811ae907ea 11-Jun-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] support running external llvm-symbolizer on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
745dd0d296e7bef712df4b5c7f86c72534953738 07-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] ioctl interceptor.

ASan: disabled by default
MSan: enabled by default
TSan: disabled


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
12d01bac1c09a8412546e71485a3cba2d416c0fc 29-May-2013 Sergey Matveev <earthdok@google.com> [asan] Make ASan report the correct thread address ranges to LSan.

This CL enables thread support in LSan when used on top of ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
975a3294d9baf6bbbcfdb3c3a0e0a24714cde7cb 22-May-2013 Alexey Samsonov <samsonov@google.com> Revert r182465 and add lsan-common library to makefile-based build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b5433dd977c6b528b7e0d83fa1fc45d6503a1226 22-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] Temporary remove leak checking from ASan, while we don't have makefile-based build for LSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
30e970f769ccf11e61e472c6f8b22f8e866c592f 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] workaround for asan bug 189 (swapcontext followed by throw gets OOM kill). Also, disable swapcontext_test on non-x86. Fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4cacb4f6fb6127099fa5a816b12b2565e5bed4fe 21-May-2013 Sergey Matveev <earthdok@google.com> [lsan] Invoke leak detection with atexit().

Keeps it consistent between ASan and LSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0bc81775b75f2c8c6c8c0e1af4008771d5b882ab 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] Do not invoke LSan hooks unless CAN_SANITIZE_LEAKS.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
71f0411c8289b57bc1a2cb3ccc02ae7fae25fd33 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] LSan hooks in asan_rtl.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0b694fcab9b2f33bdd6691cbea4e80a5c27191b1 17-May-2013 Peter Collingbourne <peter@pcc.me.uk> [nolibc] Move all platforms to internal_getpid.

Before, we had an unused internal_getpid function for Linux, and a
platform-independent GetPid function. To make the naming conventions
consistent for syscall-like functions, the GetPid syscall wrapper
in sanitizer_posix.cc is moved to sanitizer_mac.cc, and GetPid is
renamed to internal_getpid, bringing the Linux variant into use.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b76ea0ce262a97e39fbf443b6aa8768c2c27e7b7 16-May-2013 Kostya Serebryany <kcc@google.com> [asan] symbolize when possible, even if ASAN_SYMBOLIZER_PATH is not provided. On Linux this will use dl_iterate_phdr instead of /proc/self/maps, even if the symbolizer is not installed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ed20ebe35c64b8c7043447f6a48b0e5adc89aded 06-May-2013 Sergey Matveev <earthdok@google.com> [asan] Common flags in ASan.

Some flags that are common to ASan/MSan/TSan/LSan have been moved to
sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
332bf3340435a85d39d6abefbf4d6a145e17da1c 25-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Add allow_user_segv_handler to let users override SEGV handler installed by ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
dfeef67b23ba92bbee598293164ee20078f633a1 19-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make init-order checker allow access to already initialized globals.

This change adds ASan runtime option "strict-init-order" (off by default)
that makes init-order checker bark if global initializer accesses any global from different
translation unit (even if the latter is already initialized). strict init-order checking
doesn't play well with, e.g. LLVM registration machineries, and causes issue
https://code.google.com/p/address-sanitizer/issues/detail?id=178.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3f5528b4112a6e63d4535c1804bee4ba310879e7 16-Apr-2013 Sergey Matveev <earthdok@google.com> [asan] Fix spelling in asan_rtl.cc Test commit.

Reviewers: kcc, glider, samsonov

Reviewed By: glider

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D676

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
16cc10d9f4aeaec7e403102958dac475b08642ec 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] inline flags(), up to 1% perf gain on malloc-intensive code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a27bdf70ca24202dce21cf7c1a387aeaa400d889 05-Apr-2013 Kostya Serebryany <kcc@google.com> [sanitizer] found a bug by code inspection: CHECK(a=b) instead of CHECK(a==b). Was puzzled why lint did not catch it. Turns out this check was disabled for asan source. fix all cases and enable the check

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b1971ca4a3057916ca90a733c672a08127d5fe67 04-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] nuke the old unused allocator code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
2a3619ecbb56e828090b4c40ece28550f68c94de 04-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] fill first 4K of malloc-ed memory with garbage, implement flags max_malloc_fill_size and malloc_fill_byte

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7e8434940a1fe7dce531d4c458ccd714da48f609 28-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Speed-up initialization-order checking: create and use fast versions of PoisonShadow functions, store copies of __asan_global descriptors in a vector instead of list of pointers. This gives 3x speedup on both benchmarks and real binaries with lots of globals.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6e7dca77e5e28ba4411edeadc2cfb7a4e296cef6 28-Mar-2013 Alexey Samsonov <samsonov@google.com> Fix unmatching ASan runtime flag for init-order checking exposed by r178158. Add a test for r178158.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
05e16a028d26503153a8fe512a500676cad66031 26-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Change the ABI of __asan_before_dynamic_init function: now it takes pointer to private string with module name. This string serves as a unique module ID in ASan runtime. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
def1be9b7ef4091ce465c0fbfb26cdb52128ade8 21-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
89c1384464848c1ad041becf8b97936fa10de21b 20-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
83cb7877f608eb9b3d65981095216842f686c527 19-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
566c0a1f1c584c00deaed6fafb5d65abd32e1aca 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] turn off checking initialization order in ASan runtime by default. Instead, it should be turned on by default in the compiler

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
1a25379bd42f42759cb89bc8698477c3e6bd418b 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] make ASan assume ASAN_OPTIONS=symbolize=1 if ASAN_EXTERNAL_SYMBOLIZER is defined

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8bd5e74fa9d37a182088114918380e255e22e493 28-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Add the memcmp_strict flag (1 by default) that controls the behavior of accessibility checks in memcmp.
1: memcmp(p1, p2, n) always checks n bytes
0: memcmp checks up to n bytes depending on whether the memory contents differ.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
13577fed9ac2ebe5e4800b8f83e3a80832907de2 28-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses addresses higher than 0x3fffffffff

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
33934fff43c5813394fe21e68b8d82b672013465 22-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] move the .preinit_array hack into a separate file (added used attribute)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
bc3a2d13e65b22f7920d2d963912e9af2e55fdc2 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] temporarily disable alloc_dealloc_mismatch on Mac, since the previous commit caused error reports in gTest.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e1353430866fe112de0f52ab6281dbc47e40ef66 20-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] on linux, run __asan_init from .preinit_array (even earlier than before)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f882247088952deed954a19d745c2dd8871e2035 20-Feb-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] use raw syscall instead of _exit() function on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
36ea94dc39f0ed98663986f6c0409dfc0a5edeb5 19-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] Allow ASan default runtime options be overriden at compile time by providing ASAN_DEFAULT_OPTIONS macro

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
366984e3aa286f7b4fb45f5c9e703f2768c407ed 19-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

asan-rt part

Also fix lint.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e31eca900a1f8849af75100c2d92e838d79d0920 15-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] make asan work with 7fff8000 offset and prelink

When prelink is installed in the system, prelink-ed
libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap,
so we need so split the address space even further, like this:
|| [0x10007fff8000, 0x7fffffffffff] || HighMem ||
|| [0x02008fff7000, 0x10007fff7fff] || HighShadow ||
|| [0x004000000000, 0x02008fff6fff] || ShadowGap3 ||
|| [0x003000000000, 0x003fffffffff] || MidMem ||
|| [0x00087fff8000, 0x002fffffffff] || ShadowGap2 ||
|| [0x00067fff8000, 0x00087fff7fff] || MidShadow ||
|| [0x00008fff7000, 0x00067fff7fff] || ShadowGap ||
|| [0x00007fff8000, 0x00008fff6fff] || LowShadow ||
|| [0x000000000000, 0x00007fff7fff] || LowMem ||

Do it only if necessary.

Also added a bit of profiling code to make sure that the
mapping code is efficient.

Added a lit test to simulate prelink-ed libraries.
Unfortunately, this test does not work with binutils-gold linker.
If gold is the default linker the test silently passes.

Also replaced
__has_feature(address_sanitizer)
with
__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
in two places.

Patch partially by Jakub Jelinek.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
719cf0e5d7dafdf2758bb1e6324181dcb60bfd3c 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Remove the replace_cfallocator flag, which is used no more.
See https://code.google.com/p/address-sanitizer/issues/detail?id=10 for the context.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5d48617936d6415f2037a5e1b9d57f9077ee92ef 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Enable alloc_dealloc_mismatch by default on Darwin.
Enable AddressSanitizer.AllocDeallocMismatch tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
859778a4e2dffa4024fa3e13b105fd62eca44b1c 31-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] make the error messages from sanitizer_common contain the actual tool name

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c70fa28caaaec2134f2c2230821fcc0f0d7ac27e 31-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] Split ASan interface header into private and public parts. Add a test that makes sure users can include interface header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b478260a75516f350f733dccb07cf10e443f9967 28-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix a crash in asan stats printing (initialize the allocator in __asan_init)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
95f630ae40cef78fb03b18110eff43bcf8d1c040 28-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] two more internal flags for asan-rt: print_stats (0) and print_legend (1)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e5ab9688b623a5a0150c7eae1ec1caaf06d44758 23-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] initialize kHighMemEnd at startup (instead of at compile time) to simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0ed0f439ae4cec9bb62cf3be61c37596a4ed7087 18-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] kill some dead code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f7de01fc97aea34f94cb76ed33692c2534a1a607 14-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] use the slow CFI-based unwinder when reporting an error. Still use the fast unwinder for malloc/free. Linux-x86-only for now.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8f0e311767b783db4a15139dddfe7a924fa3724e 14-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Disable alloc/dealloc-mismatch checker on Mac for now (it produces weird false positives on googletest)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f4f51f2cc6fa936f0c65577f82e6b62989d546ee 14-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan/tsan: move blocking mutex from asan to sanitizer_common


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
17a7c6763224300f6740b5e7fae274734afec675 29-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a new interface function __asan_describe_address, useful for running asan-ified binary under a debugger (e.g. gdb)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
eb2809311c94b73c269ccef8d68ae368642e5754 28-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] implement more strict checking for memset/etc parameters. Instead of checking the first and the last byte, we check the entire shadow region. This costs ~10 slowdown for the instrumented functions. Motivated by a nasty memset-buffer-overflow-by-140-bytes in chrome which was reported as a use-after-free or not at all

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
478b4932f7af7c7a35c07399f2b977efe236453d 27-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] enable alloc_dealloc_mismatch by default

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c35314a119aba6d5e7fa0a06024f9cb1c49e6f5f 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement adaptive redzones. Now with asan_allocator2 allocations <= 48 bytes have 16 byte redzone, allocations of 48-96 bytes -- have 32 bytes redzone, etc (max redzone is 2048). If ASAN_OPTIONS=redzone=n is set, it changes the minimal redzone size

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9e3bd38388a7c182db57f6e3fc0943e6d12f012e 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: by default use the StackDepot to store the stack traces instead of storing them in the redzones

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
fe6d91684bcda766593800f6307233f1a33d31f6 21-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a flag alloc_dealloc_mismatch (off by default for now) which finds malloc/delete, new/free, new/delete[], etc mismatches

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
73bad81febb2a872627c03e579beea1da4b49294 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a flag poison_heap to allow better allocator benchmarking, implemenet malloc_stats() on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
570c2a0e0a00a2a80ad3403139dddad2bfe75122 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't print memory stats on CheckFailed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a30c8f9eac981dcf137e84226810b760e35c7be1 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6a08d29b2020004b801ca69d8aea5872a7e67d72 07-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: change the strategy we use for installing malloc/free/symbolization hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854 04-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e89f1846d58550f919a0ef9081b11d4b0405019d 24-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f67ec2b6e8d2ae328c27de0b026eea2d6667836e 23-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5af39e50366f1aacbebc284f572f08ad1ad07357 21-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
866334332ff8c2a1b7f3715224614b6b75a7578c 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
1ca535700966cf5019dcc6684a62a734a7b96974 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
81dfbb76f858fbc4084771fce4967ede04ed5f44 14-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
591616d323d73b7ea7cd8fea4eec46cedccda27e 11-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8e23d275ec871c16b71f3a98cc475f0db8cb3863 07-Sep-2012 Alexander Potapenko <glider@google.com> Remove the infinite recursion check for now, as we don't have __thread on Mac, and TSD is an overkill.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5aabcb547a983653a754258d63e27e3790c564d3 07-Sep-2012 Alexander Potapenko <glider@google.com> Two minor changes:
-- exit from infinite recursion in CHECK()
-- print a verbose message if mapping of the shadow memory has failed.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7315c26122cbdfee82f4dbadaedd5c1b85755503 07-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Raise quarantine size a bit with ASAN_LOW_MEMORY.

Our tests expect that a 16M block will fit in the quarantine.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
78c7f57e2dd5240b0c2c8bfefd8a776c517f1e22 06-Sep-2012 Alexander Potapenko <glider@google.com> Fix two compiler warnings: must use at least one argument for "..." in a variadic macros, signed vs. unsigned comparison.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6d924facc5c979a0d25f484cffcdb51c766ed551 06-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] increase max stack size to 256 (+test)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ff392a44a9af183de5adc8893ddd11ac77625d56 06-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] increase the maximal size of malloc/free stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
71b42c9740e6f73da607aaa539affb5c4807231c 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add print_full_thread_history runtime option (on by default) that prints all full thread creation paths for threads involved in ASan error report

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
d865fecddccebf898ceed24d096fc58fb29a6e57 29-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Relocate the external headers provided by ASan and the common sanitizer
library.

These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.

I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.

I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.

The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:

<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...

But maybe others have different suggestions?

Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
283c296b64bc55deec9698260b3427a9b050a925 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of AsanPrintf in favor of Printf from sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
947fbd1a073fcd38988c1ec131452e99bb0313f8 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
70e177e29c6f9ac987b65a79f6b4f3ebdabc75cc 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move low-level (mmap-based) allocator to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f5b925fde9c855eab4fbc71354e79cc777ed19ec 24-Aug-2012 Alexander Potapenko <glider@google.com> Revert the erroneous changes made to Makefile.old in r162547
Remove a spare newline from asan_rtl.cc


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
eb8c46e419f4c6f01d1b1a0d1b96cc51a61ecbc3 24-Aug-2012 Alexander Potapenko <glider@google.com> If the program is linked to a dynamic ASan runtime which is not present in DYLD_INSERT_LIBRARIES
(which, in turn, is required for our interceptors to take effect), re-exec the program with
DYLD_INSERT_LIBRARIES set.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9c6e5303fa025a73a09cee0766ae403909b1bb8b 23-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch the symbolization strategy that would be used by sanitizer tools family: as compiling in-process symbolizer into runtime involves certain difficulties, we may instead launch an external symbolizer program (fork + execl) in a subprocess and communicate with it via pipe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c93d3e2bdfb1ad9cce26a6e8d66764ed97a6d6b4 22-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b21de9e71522a7f9ed31fd92aafe6936873a971c 22-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
128892cb26ee50b0fa2171198c7a919540dcd4e7 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] fix mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3945c58f9db42671b1a3b865fde5008f09a3a40e 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] run-time part of the initialization order checker. Patch by Reid Watson with some bits from kcc. The sub-pass is off by default for now. On simple tests it works fine.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ec3b0732a62bd0a52da7bbfc4e227038ccf9372c 15-Aug-2012 Alexander Potapenko <glider@google.com> Use SANITIZER_INTERFACE_ATTRIBUTE instead of __attribute__((visibility("default")))
Export CheckFailed, asan_malloc, asan_free, asan_memalign, AsanStackTrace::CompressStack, AsanStackTrace::UncompressStack from the dynamic runtime library.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
08d978809ac98095815e5cab80caeb0089f89a1e 14-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure __asan_default_options symbol is exported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c6b8716d9acd202d311a7d9095eeed440bba1ce5 14-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure __asan_default_options gets default visibility, port corresponding test to lit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e2430d22c5f9055622a98dc9f885fc73b64cba23 13-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add __asan_set_on_error_callback into force_interface_symbols (thanks to cool test by glider@)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5a9938d4de74d41cb5f167f751a621dfb7545b64 09-Aug-2012 Alexander Potapenko <glider@google.com> Add a test checking that all the "__asan_" interface functions are present in a binary built with -dead_strip.
Fix force_interface_symbols() so that none of the interface symbols is stripped.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c98570beff64ec0a513dcc11a4662ffba70e43dd 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move __asan_report_error implementation to asan_report.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
448fe9a2383222633194754de34e6a3c0351ac68 09-Aug-2012 Alexander Potapenko <glider@google.com> Use a switch instead of a simple condition in force_interface_symbols().
Otherwise Clang eliminates everything after the first interface symbol that is marked noreturn.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e218beb2d14b663bd277158f386a86d0e62fef74 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] move some functions that describe addresses to asan_report.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4e21c6bc78bdc36736cd61639a160ea5f725b333 06-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices from filenames in stack traces

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b831086e7c1e6004cf57594ec81b662f290dc2ac 25-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] don't return from a never-return function. fix a test that had a chain of bugs instead of just one

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b750c4c8af128bdd63543f3715f2c147fc3e95bf 25-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] fixup for r160712: provide a default definition for weak __asan_default_options()

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8a1dd56a284de3bb94ebcfaace49266bdf0d26c1 25-Jul-2012 Alexander Potapenko <glider@google.com> Make __asan_default_options a weak function that returns a const char*.
Users may define it to override the default ASan options.
This function has to be marked with __attribute__((no_address_safety_analysis)), because it is called before ASan is fully initialized.

Add an output test checking the __asan_default_options functionality.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
79d12e87fbcc1b2342d76367b99b83adf9cbf499 23-Jul-2012 Alexander Potapenko <glider@google.com> For wild addresses in the shadow or shadow gap areas print an error message instead of crashing on a check.
Add AddressSanitizer.MemsetWildAddressTest that makes sure a proper error message is printed.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b134ffa00ce2a4cbf7f48ac029e31c3e6e23ff6b 17-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of the last operator new call in asan rtl

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9b1b10193420f5adc769eda0d5bd548e429e0ce2 10-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] fix CMake build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7ed1d2b699767dd1875994cb625d51a95b44221a 10-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] move flags description to separate header, add comments about them.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4fbbcbea41c91498ac4cfbb3d3c7e1d83d7bb380 09-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup: remove dead flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
cb8c4dce691097718d5af41b36899b72ef4b1d84 09-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use common flags parsing machinery.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
fce5bd4cc29fddb5e8f0cb9c12df7c10187a991d 29-Jun-2012 Dmitry Vyukov <dvyukov@google.com> tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
94c54f19d4330cbf2b6fd83b65841f706e34365e 23-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] fix -Wsign-compare

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
39b2e6aaf20e7a3257fd0146c35cec587b3fffb0 21-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix lint error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0aa794d78fbb6359f81025217559f1b03ff07999 21-Jun-2012 Alexander Potapenko <glider@google.com> Factor the common code out of cf_free and mz_free.
Introduce the mac_ignore_invalid_free flag (0 by default) which makes both cf_free and mz_free ignore invalid free invocations and leak memory.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c925697df6626bb0ea27ea96539bf0580f8f3d3d 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
dd3a911e46b3f0416d60d9be5c84ccfc4b1c3aa8 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
be7420cc79d8580eb354666eef638d39ee9cff80 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f607fc1c67a613a59a1db3c80c5d1322e1978102 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move rest of mmap routines to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3dbeabb3446f203156ae03d957de9bdf50933ae4 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move portable GetEnv to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0334fc8564e91d5ebd495066bb263af36331fe61 07-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] slow 16-byte redzones (still experimental)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
cffe2f5c30c27234260d004b54152916ff0c45c6 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Move ReadFileToBuffer to sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a25b3463477d2a825df4f656001fc07c594b35ac 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch to common mmap/munmap routines in ASan run-time.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
15a77612e0a89c1df444a2034e531c8968d0cedf 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use common CHECK machinery. Currently each tool has to define its own CheckFailed function.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e0cff0bc20ae51790c8edfbceb817e18ebf5355e 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] make tid u32 instead of int

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e954101f6602ac181a2c3accfbbad0ae51b0bf7c 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [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).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e4309e8141382372465ea065e86d8f946aa99c38 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] more format fixes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5bcca4e33ececdddd8e9e07619c129e870492251 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Make printf arguments match format strings better.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
47657ce6cbac2fa93d0fd765c5d2872443b50e87 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use __sanitizer::Die() in ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b9a30e0799787a99147e2587ef5ecc8c5f224160 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] remove using namespace __sanitizer lines

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0a4c906dbc8f150657ddd4f19a7192b779f1d605 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use common defines for ASan and TSan runtime. Split defines between interface defines (can be visible in user code that includes interface ASan/TSan headers) and internal defines.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
2221f553886c37401b5d84923634ebf04bc482f1 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] use internal_{close,read,write} in ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9552db72ce37a9f090be4d9fecfbe75458c6d7bb 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] use internal_open from sanitizer_libc in ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e5f5895bda30f374b0b51412fd4d837fa59aed66 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Remove file-type tags for .cc files in ASan run-time library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5f2fe37bd979f18703a6b3b5bf71d18fca19b245 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use ASan option symbolize to turn on internal symbolizer (in development)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ee3925515e4c7966f3ef489f687aa7e5692806a9 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3f4c3875c42078e22c7e5356c5746fd18756d958 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9aead37421a6e4bf43265e5195c6ac31fc519982 31-May-2012 Kostya Serebryany <kcc@google.com> [asan,tsan] introduce sanitizer_common/sanitizer_defs.h and perform some renaming in asan rt. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6b6dc57066fc154fbf08440cb41db099878a14e9 30-May-2012 Alexander Potapenko <glider@google.com> Fix a bug in parsing boolean flags: we used to take the first char of the key=value string
instead of the first character of the value.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e4781f0c5871a14e2c454d7788bae2e5c72bd336 30-May-2012 Alexander Potapenko <glider@google.com> Be less verbose when parsing the default options.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b3cedf98a3c8545da2234c2d35cb5d687984035f 29-May-2012 Kostya Serebryany <kcc@google.com> [asan,tsan] Add a new directory compiler-rt/lib/sanitizer_common
which will contain code shared between asan and tsan run-times.

Naming is hard. If you can suggest a better name for the directory -- speak up.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ff20f17cd0543bc9d4112831574b9bb6a0f21fc6 29-May-2012 Alexey Samsonov <samsonov@google.com> Fixing ASan build on Win: don't use __asan_default_options

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
62f10e7e8b604275ca1c7cc924f32854d04829fb 28-May-2012 Alexander Potapenko <glider@google.com> Rework the flags machinery a bit.
Clients may define the __asan_default_options char string containing the default options for the tool now.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f2981f3bfdc7900784d446d2dde96d99fbcad756 25-May-2012 Alexander Potapenko <glider@google.com> Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
fca72fd2741372d2e947366277258bff1092e73e 25-May-2012 Alexander Potapenko <glider@google.com> Factor ParseAsanOptions outside __asan_init



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
37931239a3671ac0d2c7865f3077b0c4f71b94b3 25-May-2012 Alexander Potapenko <glider@google.com> 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.*


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8ca02789a274fa46abccacad4a0820a9fe2f75f4 12-May-2012 Alexander Potapenko <glider@google.com> Increase error_message_buffer_size to 64K (16K is insufficient for large programs)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f2b1df7cb8f53f51bcb105e0d2930d99325bb681 10-May-2012 Alexander Potapenko <glider@google.com> Fix ReadFileToBuffer to return 0 on failure (-1 is too large if returned as size_t).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4d9a9576c143fb6091b01cde3a87fc62461205c8 06-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] minor change to please gcc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4d5f98df886051afeece1698d4bc8f154391c22d 06-Apr-2012 Alexey Samsonov <samsonov@google.com> [ASan] move replacements for new/delete to separate file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f8e6fee734cf5e3d061f576244b2704853148b04 06-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] add flags: disable_core, abort_on_error and unmap_shadow_on_exit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f03d8afc8b8dd072c4e2884a7475ee28ac5f3f41 05-Apr-2012 Alexander Potapenko <glider@google.com> Introduce the use_sigaltstack flag (off by default), which enables using alternate
per-thread stacks for signal handling. This allows to print more verbose error reports
for stack overflows.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
739eb7984139d457216623347ae3b7a706c0aadf 21-Mar-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [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.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
95d6b33a6a533f628872bd942339ff42f9ff1a6b 20-Mar-2012 Alexey Samsonov <samsonov@google.com> [ASan]: re-enable noreturn attribute on posix

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@153082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
feb479345ccc947e3e7429b949caa7f89c84a85e 16-Mar-2012 Alexander Potapenko <glider@google.com> [ASan] Print the parsed ASAN_OPTIONS for verbosity>0.
Move the flags around slightly.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9f311bb0919d86ab3df2810dc0b81b70a87677e3 15-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] fix unwinding inside libc intercepors (asan issue #46)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f0977db20608fa61fe6dd14d96cdd94c35c85b4e 14-Mar-2012 Kostya Serebryany <kcc@google.com> [asan] fix -Wnull-conversion warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
dadc45d92ea166174b9b119f7fedc25fd3b538d7 06-Mar-2012 Alexander Potapenko <glider@google.com> Force __asan_handle_no_return into the binary built with ASan.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
2f3f962de9aeaef47d41bf3d6009bbd0280e2620 01-Mar-2012 Alexander Potapenko <glider@google.com> Force __asan_set_death_callback into the resulting binary.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3fe913558354f76707e2c5584559521399854b79 27-Feb-2012 Alexander Potapenko <glider@google.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8ae44ac678644265ba82a1b5696a402c9301a85c 27-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Replace some #ifdef(s) with plain if(s).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b823e3c5f7891dbbde1eb288237f5f3d5ed64d85 22-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: get rid of stdlib.h and add (smaller) stddef.h instead

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
39c22ee8c3d2d052148a40fd00f1adbb17aabe4d 22-Feb-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Fix style + suppress 'long' lint warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
99d17ebc36fe74326493bdd3dab4082ffc1dc96e 22-Feb-2012 Alexander Potapenko <glider@google.com> Move the contents of AsanProcMaps::Dump() into AsanDumpProcessMaps() for Posix systems.
Define AsanDumpProcessMaps as unimplemented on Windows.

This should fix the Windows build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ddaf73924385de46aa015059b876676ced63826f 22-Feb-2012 Alexander Potapenko <glider@google.com> Dump the process memory map if any of the mappings interleaves with the shadow.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
38ed73630902782ba3743529d0cce2ba3014c53e 21-Feb-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Add __asan_init to the list of C dynamic initializers to support /MD on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8898102a6b1479a9af65857ccbbc1c329a4d9187 17-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: use custom strtol/atoll functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6a3e6fd72e1e2322d28ced9d9c2adbd720e7fabf 17-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
788e1d704436065beb514fdde86070f61d0394ed 16-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Allocator tweaks for low memory systems.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5e4e91cf211c76ea7103bd3718285443c5c3cd78 16-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] don't do AsanDie twice

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5362717f2c121384778429b5cf34712925ad4a9b 14-Feb-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Define an internal implementation of strchr to make stack OOB tests pass on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
e1fe0fd868886b53cb8d5d957afebbdd47688df7 13-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] implement __asan_set_death_callback

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f73a6a3f81573ba85a5e29955980818b18b0a58a 13-Feb-2012 Alexander Potapenko <glider@google.com> Move the non-trivial implementation of AsanShadowRangeIsAvailable to asan_mac.cc
to avoid crashes on Linux and Win.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c50e83576323d93433086b4c751f1746597a4286 13-Feb-2012 Alexander Potapenko <glider@google.com> Check whether the shadow memory range intersects with an existing mapping.
This should help to detect problems with ASLR or linker tricks early.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
5ffafd8c9eece8453ea1434bb698b0c691954067 13-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Default visibility for __asan_handle_no_return.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
3e81fe43798c096d1d3565596f0717b9919de4fb 09-Feb-2012 Timur Iskhodzhanov <timurrrr@google.com> [asan] The first version of the RTL for Windows, reviewed at http://codereview.appspot.com/5647052

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f54b1f9b73a6855d77ee270c282bd61407fa73a0 08-Feb-2012 Kostya Serebryany <kcc@google.com> [asan] unpoison the stack before every noreturn call. Fixes asan issue 37. rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
09672caefb5694f1981a1712fdefa44840a95e67 08-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: replace all "real_X" calls with "REAL(X)"

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
adf2b036127d7e887392d9be5b02069b777ee280 03-Feb-2012 Alexey Samsonov <samsonov@google.com> AddressSanitizer: Replace __attribute__ with macro (for Win compatibility). Patch by timurrrr@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
cb00d134727c322e2f26298912f77e10be46aefe 31-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] new run-time flag: sleep_before_dying (asan Issue #31)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6f0452914ec76c786eb865983793bc03b00fc7b6 27-Jan-2012 Alexander Potapenko <glider@google.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9cfa194cc62026fc7c6e82f7303eee8ad4d10cf4 19-Jan-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> EHABI-based stack trace on ARM.

The change removes the unused FLAG_fast_unwind, and forces EHABI-based unwind
on ARM, and fast (FP-based) unwind everywhere else.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
454a064850f5a9133af50a3d5f79f74adfb3d0d0 17-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] fix ReadFileToBuffer to correctly handle files from /proc/ (asan issue 27)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
1e316d7f488a75312539629e9d937e156280eeb6 13-Jan-2012 Alexander Potapenko <glider@google.com> This patch moves the code reading /proc/self/environ into AsanGetEnv
in asan_linux.cc, because /proc is unavailable on Mac.
Instead the Mac version of AsanGetEnv iterates over the array of
environment variables obtained from _NSGetEnviron()



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
8bcc6b93abafee3cb15e20fda0f1e1d4967bb80e 11-Jan-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Call asan_init from .preinit_array.

Protected by an #ifdef, disabled by default.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
d47189c1b63a4de755d7ec071f8d56c8d01cc667 11-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] remove OS-dependent includes from asan_interceptors.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0ecf5eb729dd81a43f8585cb438d3cb2a35899ed 10-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] don't include unistd.h in the headers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a4ccf878e464d29a4a18756c5c4f626dc530a12e 09-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] don't use strstr/strncat from libc, use our own versions instead

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a7e760a53bc43b8e09bfdf5cd6f215267ba99729 09-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] refactoring: move some common linux/mac code to asan_posix.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4803ab90ead451b55a5833f0fd38b10fd1fc83eb 09-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] refactoring: move all interceptors to a single file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a6b52264e1231bfc4ee9a2d9a4f32678c97295f0 06-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] do not use new/delete for the internal thread structure

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9107c26bd88fc9cf44a2cd7d6967eb830ac63be3 06-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] move more code into OS-specific files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
26c1596c6824925908b0a9d3b37d6ac340409b13 06-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] cleanup: remove the SIGILL-related code (rt part)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
ef14ff6512d7b2e20aa3206dff820b5f90285420 06-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] move more stuff to OS-specific files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
df499b44de81fc757a789878f07fcaf19ebb0016 05-Jan-2012 Kostya Serebryany <kcc@google.com> [asan] implement our own /proc/self/maps reader and use it on linux instead of sysinfo.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
4558168b361d59be9cc5510b72bb0de9ca795c3a 29-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] force the __asan_unregister_globals to reside in the runtime library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a874fe5b5d67152e4e737498d532eec80940bdcd 29-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] refactoring: don't #include <sys/mman.h> in non-os-specific files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
de496f451bce322b6cde100456591f1f50ab3477 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] use custom libc-free getenv; a bit of refactoring around mmap calls

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6413ec3de37304f657adb36d6cd58e4919dba231 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] no ucontext on Android. patch by eugeni.stepanov@gmail.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
0ffe35c08475334243f760128c5b4b987e5a274b 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] enable memset/memcpy/memmove interceptors in asan-rt (in addition to those in the compiler module)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
51e75c45a6886455a5bdb91c0951bc77dd2c47a2 28-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] make sure __asan_report_* functions are not inlined (so that they are not optimized away and are kept in the resulting library). Patch by glider@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
9a20026e3c5ee0e0ae423aea259489ccce9ff19a 28-Dec-2011 Kostya Serebryany <kcc@google.com> new() has slightly different signature on Android. This patch adds the

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@147300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
f32b41d3a0b52e9373abbe76c17b48b67633aefa 16-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] revert r146529: we do need to build asan-rt as a shared library. Will need to find a different way to modify preinit_array

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
6b30e2cf0d9d471d276f91ef4bb74dbd9876f4d9 15-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] poison the internal asan heap memory, just in case. Change Printf to Report when debugging globals.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
a5f10b95d578d8fc4d05c757273127382153b21e 14-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] insert __asan_init into ".preinit_array" section. Linux-only.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c4b34d9af5a7849f91b9a9ba418a2bd144b0812b 09-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] make use-after-return mode more robust: allow to call instrumented functions while reporting an error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
c6f2223a8772262e5e682403f2d57f0b465a98fc 08-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] move build-time config options from makefile to source (otherwise we need config options in all makefiles)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
acd5c617b219e0f059620c2a3928d2cc821d4534 07-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] fix the error message for 16-byte accesses (it previously printed 'unknown-crash')

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
dd8d4981e149fd32b83406fae2dc42216c771f79 06-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] minor cleanup

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
30743140ff0f904b7f422b61d208e2837e7c631e 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] always collect malloc statstics (removed FLAG_stats)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b3010e75d1c88b6f2084c80530e06ffe8d6f19a2 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] don't require __cxa_throw to be present in the process. This is the last dependency on libstdc++

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
b89567ce41bef82cf92a9c741c78b632c07b2781 02-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] get rid of std::map. No STL and almost no libstdc++ left.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
2d8b3bdb112ebb8ed3f15ee41d4cebcd683b41b0 02-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] minimize the use of STL. One bit is still left.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
7855275763348a191f88cf2c741618785d62fde7 02-Dec-2011 Daniel Dunbar <daniel@zuster.org> build/asan: Better fix for ASAN i386 build on Darwin, this causes us to see the
non-standard struct names.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
fe18082eb32b4b8a9b9bee1f252fc9e7791aab2a 02-Dec-2011 Daniel Dunbar <daniel@zuster.org> build/asan: Fix ASAN build for i386, for reasons I don't really understand we
get the DARWIN_UNIX03 definition on x86_64 but not on i386.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
d6567c5166412f6acdde851e767c26f332d51d3d 01-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] flatten the asan-rt build slightly

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
218a9b70d7338cf5b727b7dad6b080ad7869c6c2 30-Nov-2011 Kostya Serebryany <kcc@google.com> Refactor shadow poisoning done by asan-rt, no funtionality changes; patch by samsonov@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc
1e172b4bdec57329bf904f063a29f99cddf2d85f 30-Nov-2011 Kostya Serebryany <kcc@google.com> 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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/asan/asan_rtl.cc