[llvm-commits] AddressSanitizer: start factoring out interception machinery (issue 5642046)

samsonov at google.com samsonov at google.com
Wed Feb 8 07:38:11 PST 2012


kcc@:
1) Moved auxiliary functions under __interception namespace.
2) Why can't we for simplicity declare real_f inside __interception
namespace as well? This may break if two different libraries using
interception are linked together, but it's a mess anyway, as they'll
have interceptors for the same functions.
3) This CL is large already, so I'd prefer to resolve some FIXMEs after
this CL is submitted, if you don't mind.

glider@ suggested we should remove all OS-specific
details from the header "interception.h", so I moved them
to OS-specific headers. In this way the user code will not include
<dlfcn.h> or mach_override.h


http://codereview.appspot.com/5642046/diff/1012/asan_interceptors.h
File asan_interceptors.h (right):

http://codereview.appspot.com/5642046/diff/1012/asan_interceptors.h#newcode34
asan_interceptors.h:34: size_t internal_strlen(const char *s);
On 2012/02/08 08:19:17, glider wrote:
> BTW aren't these functions already declared in asan_internal.h?

Not yet.

http://codereview.appspot.com/5642046/



More information about the llvm-commits mailing list