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

glider at google.com glider at google.com
Tue Feb 7 08:42:36 PST 2012


http://codereview.appspot.com/5642046/diff/1/interception/interception.h
File interception/interception.h (right):

http://codereview.appspot.com/5642046/diff/1/interception/interception.h#newcode100
interception/interception.h:100: bool OverrideFunction(void *old_func,
void *new_func, void **orig_old_func);
#define INTERCEPT_FUNCTION(func)
#ifdef __linux__
INTERCEPT_FUNCTION_LINUX(func)
#elif __APPLE__
...

WDYT?

This won't dictate unnecessary interfaces to the systems that don't need
them and will hide this stuff from the user.

http://codereview.appspot.com/5642046/diff/1/interception/interception_mac.cc
File interception/interception_mac.cc (right):

http://codereview.appspot.com/5642046/diff/1/interception/interception_mac.cc#newcode71
interception/interception_mac.cc:71: orig_old_func,
On 2012/02/07 14:31:32, samsonov wrote:
> On 2012/02/07 13:14:29, glider wrote:
> > mach_override_ptr_custom should have a custom prefix, too.

> So, you'd need different mach_override_ptr for each tool?
(disregarding custom
> allocate/deallocate island)

We'll need an option to prepend a custom prefix to it.
I'll do that later in mach_override (I had asked Jonathan about that,
but he hasn't responded yet)

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



More information about the llvm-commits mailing list