[asan] instrument memory accesses with unusual sizes
authorKostya Serebryany <kcc@google.com>
Tue, 19 Feb 2013 11:30:25 +0000 (11:30 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 19 Feb 2013 11:30:25 +0000 (11:30 +0000)
commit9f298da9bd4ad5ecaa51fc137fb670fe288950dc
tree81770ae55be1049b7608a607367812e92cb0a6d1
parent3ece9beaf195950480281f131056232a66c3349a
[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.

llvm-svn: 175508
compiler-rt/lib/asan/asan_mac.cc
compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/lib/asan/lit_tests/Darwin/interface_symbols_darwin.c
compiler-rt/lib/asan/lit_tests/Linux/interface_symbols_linux.c
compiler-rt/lib/asan/tests/asan_test.cc
compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cc