Go to file
Reid Kleckner 3b0290570b [asan] Intercept all Heap* related imports from ucrtbase.dll
ucrtbase.dll appears to be built with some kind of cross-module
inlining, because there are calls to imported Heap* routines sprinkled
throughout the code. This inlining defeats our attempts to hotpatch
malloc, _malloc_base, and related functions. Failing to intercept an
allocation or deallocation results in a crash when the program attempts
to deallocate or reallocate memory with the wrong allocator.

This change patches the IAT of ucrtbase.dll to replace the addresses of
the imported Heap* functions with implementations provided by ASan.  We
don't globally intercept the win32 Heap* functions because they are
typically used by system DLLs that run before ASan initializes.
Eventually, we may want to intercept them, but for now I think this is
the minimal change that will keep ASan stable.

Reviewers: samsonov

Differential Revision: http://reviews.llvm.org/D18413

llvm-svn: 264327
2016-03-24 20:19:48 +00:00
clang Change ADL to produce lookup results in a deterministic order. This fixes some 2016-03-24 19:12:22 +00:00
clang-tools-extra [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker. 2016-03-24 19:42:36 +00:00
compiler-rt [asan] Intercept all Heap* related imports from ucrtbase.dll 2016-03-24 20:19:48 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Fix ilogb(double) return type 2016-02-24 00:52:15 +00:00
libcxx Guard a number of tests relying on threads support when built in 2016-03-23 21:04:11 +00:00
libcxxabi [libcxxabi] Disable cxa_thread_atexit_test if unavailable 2016-03-17 10:00:24 +00:00
libunwind [AArch64] Fix libunwind build when using GNU assembler 2016-02-11 21:22:57 +00:00
lld Simplify AArch64 isRelRelative 2016-03-24 19:12:14 +00:00
lldb [JITLoaderGDB] Read jit entry struct manually. 2016-03-23 23:27:23 +00:00
llgo [llgo] Increment "Debug Info Version" 2016-03-23 23:09:00 +00:00
llvm [ThinLTO] Use bulk importing in llvm-link 2016-03-24 19:52:20 +00:00
openmp [OMPT] Fix parallel_id and task_id in loop_end with schedule static 2016-03-24 12:52:20 +00:00
polly [CMAKE] Try to find the correct globbing expression 2016-03-24 14:31:49 +00:00