[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:32:01 PST 2012


Hi all,

this is a draft patch that extends the dynamic runtime with yet more
interposers and greatly simplifies the allocation hooking on OS X.

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

In order to make this work, another (one-line) patch to the driver is
required that makes the linker link with
libclang_rt.asan_osx_dynamic.dylib instead of libclang_rt.asan_osx.a
That will break all the clients that copy ASanified binaries from
their build dirs, because the instrumented binaries will now require
the dynamic runtime to be present somewhere around (the clients' build
systems will need to copy the runtime to an appropriate place and fix
its install name, since the dylib is shipped with the compiler).
Any comments on how to make this easier on the LLVM side are welcome.

--
Alexander Potapenko
Software Engineer
Google Moscow



More information about the llvm-commits mailing list