summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASan] Support the asan_loadN/asan_storeN functions in the DLL thunk libraryEhsan Akhgari2014-08-011-0/+14
| | | | | | | | | | | | | | | Summary: This is required for linking DLLs with large functions exceeding san-instrumentation-with-call-threshold. One such function is vp9_fdct16x16_sse2 in libvpx. Reviewers: timurrrr Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4758 llvm-svn: 214532
* [asan] End-to-end test for REP MOVS instrumentation.Evgeniy Stepanov2014-07-311-0/+53
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 214396
* [asan] rename new-delete-size-mismatch to new-delete-type-mismatch and make ↵Kostya Serebryany2014-07-304-9/+11
| | | | | | the report more verbose llvm-svn: 214299
* [asan] add a feature to detect new-delete-size-mismatch (when used with ↵Kostya Serebryany2014-07-307-21/+51
| | | | | | -Xclang -fsized-deallocation). Not yet on Mac. Also, remove some unused code. llvm-svn: 214296
* [Sanitizer] Simplify Symbolizer creation interface.Alexey Samsonov2014-07-261-1/+1
| | | | | | | | | | | Get rid of Symbolizer::Init(path_to_external) in favor of thread-safe Symbolizer::GetOrInit(), and use the latter version everywhere. Implicitly depend on the value of external_symbolizer_path runtime flag instead of passing it around manually. No functionality change. llvm-svn: 214005
* [Sanitizer] Introduce SANITIZER_CAN_USE_PREINIT_ARRAY definition and use it ↵Alexey Samsonov2014-07-252-9/+1
| | | | | | | | | | across sanitizers. Get rid of ASAN_USE_PREINIT_ARRAY and LSAN_USE_PREINIT_ARRAY - just always use .preinit_array if it's available. This mode seems stable enough, and we've been relying on default values of these macro for a long time. llvm-svn: 213980
* Allow initialization of Asan interceptors before the general Asan ↵Viktor Kutuzov2014-07-251-0/+1
| | | | | | | | initialization takes place on FreeBSD Differential Revision: http://reviews.llvm.org/D4496 llvm-svn: 213941
* [ASan/Win] Add SEH handling to the DLL thunk as wellTimur Iskhodzhanov2014-07-221-0/+4
| | | | llvm-svn: 213656
* [ASan/Win] Handle SEH exceptions (best-effort, similar to longjmp)Timur Iskhodzhanov2014-07-222-2/+13
| | | | llvm-svn: 213654
* [ASan/Win] Add handling of C++ exceptions to the RTLTimur Iskhodzhanov2014-07-221-0/+9
| | | | | | Also add a longjmp() test llvm-svn: 213649
* [ASan] Fix __asan_describe_address and add a test for it.Alexey Samsonov2014-07-211-0/+3
| | | | llvm-svn: 213583
* Add FreeBSD support to the Asan symbolization scriptViktor Kutuzov2014-07-181-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D4560 llvm-svn: 213370
* [asan] Remove leftover debug printf.Evgeniy Stepanov2014-07-171-1/+0
| | | | llvm-svn: 213264
* [asan] Fix malloc interception on Android L Preview.Evgeniy Stepanov2014-07-171-39/+61
| | | | | | | | Format of __libc_malloc_dispatch has changed in Android L. While we are moving towards a solution that does not depend on bionic internals, here is something to support both K* and L releases. llvm-svn: 213263
* [compiler-rt] [asan] Refactor DescribeAddressIfStack to allow reuse for ↵Kuba Brecka2014-07-172-28/+39
| | | | | | | | | | debugging API Refactoring the DescribeAddressIfStack function in asan_report.cc to be able to reuse it for http://reviews.llvm.org/D4527. Reviewed at http://reviews.llvm.org/D4545. llvm-svn: 213215
* [ASan] Factor out SymbolizationLoop.process_line() function to let PythonAlexander Potapenko2014-07-161-25/+31
| | | | | | scripts that import asan_symbolize to symbolize their reports line by line. llvm-svn: 213136
* [ASan] Add ASan debugging API to get malloc/free stack traces and shadow ↵Kuba Brecka2014-07-153-0/+86
| | | | | | | | memory mapping info Reviewed at http://reviews.llvm.org/D4466 llvm-svn: 213080
* [ASan] Only define macros in asan_init_version.h, move the __asan_init ↵Timur Iskhodzhanov2014-07-153-9/+10
| | | | | | | | | | declaration back to asan_interface_internal.h This fixes the issues we've uncovered after landing r212815. Reviewed at http://reviews.llvm.org/D4500 llvm-svn: 213053
* [ASan] Improve ODR-violation error reports.Alexey Samsonov2014-07-111-3/+8
| | | | | | Demangle names of involved globals. Print a more consistent summary line. llvm-svn: 212857
* [asan] fix x32 build, patch by H.J. LuKostya Serebryany2014-07-111-1/+2
| | | | llvm-svn: 212823
* [ASan/Win] Don't apply dllexport to __asan_init in the DLL thunkTimur Iskhodzhanov2014-07-111-1/+1
| | | | | | | | This fixes '___asan_init_v4 already defined' errors when linking some of Chromium DLLs. Looks like one of the DLL is using a .lib produced while linking another DLL and it exploded after r212699. I'm trying to come up with a small testcase... llvm-svn: 212815
* [ASan] Print register values in a consistent wayTimur Iskhodzhanov2014-07-111-5/+5
| | | | llvm-svn: 212809
* [ASan/Win] Catch NULL derefs and page faultsTimur Iskhodzhanov2014-07-114-6/+46
| | | | | | Reviewed at http://reviews.llvm.org/D4471 llvm-svn: 212807
* [ASan/Win] Don't hardcode ASan runtime version in ASan dll thunkTimur Iskhodzhanov2014-07-103-18/+44
| | | | | | Reviewed at http://reviews.llvm.org/D4459 llvm-svn: 212699
* [ASan] Force the compiler to generate frame pointer in certain Mac-specific ↵Alexey Samsonov2014-07-101-0/+12
| | | | | | | | interceptors. Patch by Kuba Brecka! llvm-svn: 212664
* [ASan] Clean up leftovers from assembly instrumentation helpersAlexey Samsonov2014-07-071-5/+0
| | | | llvm-svn: 212471
* Generalize sanitizer allocator public interface.Alexey Samsonov2014-07-078-53/+94
| | | | | | | | | | | | | | Introduce new public header <sanitizer/allocator_interface.h> and a set of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc. that will eventually replace their tool-specific equivalents (__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific functions are now deprecated and implemented as stubs redirecting to __sanitizer_ versions (which are implemented differently in each tool). Replace all uses of __xsan_ versions with __sanitizer_ versions in unit and lit tests. llvm-svn: 212469
* [asan] Remove runtime assembly helpers.Evgeniy Stepanov2014-07-074-922/+8
| | | | | | | | Remove helper functions that were used in assembly instrumentation. Patch by Yuri Gorshenin. llvm-svn: 212456
* [sanitizer] support c11 aligned_alloc, Linux only for nowKostya Serebryany2014-07-041-0/+5
| | | | llvm-svn: 212322
* [asan] i686-linux-android support.Evgeniy Stepanov2014-07-031-1/+3
| | | | | | | | | | | | Large part of this change is required due to https://code.google.com/p/android/issues/detail?id=61799 dlsym() crashes when symbol resolution fails, which means we have to limit the interceptor list instead of relying on runtime detection. There are minor differencies in system headers, too. llvm-svn: 212273
* [ASan] Print exact source location of global variables in error reports.Alexey Samsonov2014-07-023-11/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the original feature request. Introduce llvm.asan.globals metadata, which Clang (or any other frontend) may use to report extra information about global variables to ASan instrumentation pass in the backend. This metadata replaces llvm.asan.dynamically_initialized_globals that was used to detect init-order bugs. llvm.asan.globals contains the following data for each global: 1) source location (file/line/column info); 2) whether it is dynamically initialized; 3) whether it is blacklisted (shouldn't be instrumented). Source location data is then emitted in the binary and can be picked up by ASan runtime in case it needs to print error report involving some global. For example: 0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40 These source locations are printed even if the binary doesn't have any debug info. This is an ABI-breaking change. ASan initialization is renamed to __asan_init_v4(). Pre-built libraries compiled with older Clang will not work with the fresh runtime. llvm-svn: 212188
* [asan] when reporting an ODR violation, also print the stack traces where ↵Kostya Serebryany2014-06-203-5/+48
| | | | | | the globals have been registered (thus show the name of shared library or exe to which the global belongs). The reports become a bit too verbose but I do not see any *simple* way to make them more compact. This should be especially helpful when the ODR happens because the same .cc file is used twice in the project in differend DSOs llvm-svn: 211343
* Fix getting IP, BP and SP for address sanitizer's needs on FreeBSD in 32-bit ↵Viktor Kutuzov2014-06-151-9/+6
| | | | | | mode llvm-svn: 210988
* Exclude Android from the tests for valloc/pvalloc.Dan Albert2014-06-141-1/+2
| | | | | | | These functions are being removed from Android because they were removed from POSIX 2004. llvm-svn: 210962
* [asan] Add malloc_usable_size to android malloc dispatch.Evgeniy Stepanov2014-06-091-8/+10
| | | | llvm-svn: 210452
* [asan] Make ReplaceSystemMalloc optional on Android.Evgeniy Stepanov2014-06-063-6/+14
| | | | | | | Don't fail if __libc_malloc_dispatch is missing; continue running with normal linux interceptors instead. llvm-svn: 210322
* [asan] initialize fake_stack_ to 0 before we call SetThreadStackAndTls, ↵Kostya Serebryany2014-06-061-1/+3
| | | | | | because that may actually try to use fake_stack_ (still don't know how). Yet another case where we desperately want https://sourceware.org/glibc/wiki/ThreadPropertiesAPI llvm-svn: 210315
* [asan] asan_device_setup: extend search pathEvgeniy Stepanov2014-06-051-2/+2
| | | | | | In standalone build asan-rt is stored in yet another path. llvm-svn: 210259
* [asan] Use -pthread instead of -lpthread in tests.Evgeniy Stepanov2014-06-051-2/+2
| | | | llvm-svn: 210255
* [asan] Add install rule for Android runtimeGreg Fitzgerald2014-06-041-0/+3
| | | | llvm-svn: 210216
* [sancov] Handle fork.Evgeniy Stepanov2014-06-042-0/+16
| | | | | | | | | | Reset coverage data on fork(). For memory-mapped mode (coverage_direct=1) this helps avoid loss of data (before this change two processes would write to the same file simultaneously). For normal mode, this reduces coverage dump size, because PCs from the parent process are no longer inherited by the child. llvm-svn: 210180
* [asan] enable detect_odr_violation=2; ↵Kostya Serebryany2014-06-031-0/+1
| | | | | | https://code.google.com/p/address-sanitizer/wiki/OneDefinitionRuleViolation . This feature has been working quite well so far, found a few bugs and zero false positives. The main problem is that there could be lots of true positives and users will have to disable this checking until the bugs are fixed. llvm-svn: 210106
* [ASan Win] Manually call __asan_init early in the DLL initialization process ↵Timur Iskhodzhanov2014-06-021-1/+16
| | | | | | to avoid a null function call in cout/cerr constructors llvm-svn: 210030
* [asan] Improve vDSO check in AsanCheckDynamicRTPrereqs; patch by Yuri GribovKostya Serebryany2014-06-021-0/+4
| | | | llvm-svn: 210012
* [Sanitizers Win] Move duplicate Windows-specific compiler flags to a common ↵Timur Iskhodzhanov2014-05-301-15/+1
| | | | | | | | CMake variable Reviewed at http://reviews.llvm.org/D3952 llvm-svn: 209889
* [ASan Win] DLL thunk: make each INTERFACE_FUNCTION unique to prevent ICF ↵Timur Iskhodzhanov2014-05-301-1/+4
| | | | | | linker optimizations llvm-svn: 209881
* [asan] Enable ASan on PowerPC.Evgeniy Stepanov2014-05-302-0/+10
| | | | | | Patch by Peter Bergner. llvm-svn: 209879
* Moved the builtins documentation to lib/builtins/Greg Fitzgerald2014-05-281-4/+3
| | | | | | | | And fixed typos in the ASan readme. Differential Revision: http://reviews.llvm.org/D3927 llvm-svn: 209778
* [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make ↵Timur Iskhodzhanov2014-05-281-7/+12
| | | | | | | | Windows-only tests explicitly use clang-cl. Reviewed at http://reviews.llvm.org/D3893 llvm-svn: 209719
* [asan] Add a dll thunk for __sanitizer_cov_module_init.Evgeniy Stepanov2014-05-281-0/+2
| | | | llvm-svn: 209718
OpenPOWER on IntegriCloud