[llvm-commits] [PATCH] [ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.

Alexander Potapenko glider at google.com
Thu Dec 13 09:18:02 PST 2012


Hi kcc,

This CL drastically simplifies the way we're hooking the memory allocation routines in ASan on Mac by using dylib interposition to replace the main malloc_zone_* functions. This allows us to avoid replacing the default CFAllocator and drop the CF dependency at all.
Committing this patch as is will result in the static runtime being broken, so we probably need to work out the transition plan before switching to the dynamic runtime.

http://llvm-reviews.chandlerc.com/D216

Files:
  dynamic/asan_interceptors_dynamic.cc
  tests/CMakeLists.txt
  asan_mac.cc
  asan_intercepted_functions.h
  lit_tests/strncpy-overflow.cc
  lit_tests/use-after-free.cc
  lit_tests/heap-overflow.cc
  asan_malloc_mac.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D216.1.patch
Type: text/x-patch
Size: 21410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121213/44039191/attachment.bin>


More information about the llvm-commits mailing list