[llvm-commits] AddressSanitizer: use macro to define and declare interceptors for system functions (issue 5609049)

samsonov at google.com samsonov at google.com
Thu Feb 2 01:55:23 PST 2012


http://codereview.appspot.com/5609049/diff/1/asan_interceptors.cc
File asan_interceptors.cc (right):

http://codereview.appspot.com/5609049/diff/1/asan_interceptors.cc#newcode486
asan_interceptors.cc:486: INTERCEPTOR(char*, strcpy, char *to, const
char *from) {  // NOLINT
On 2012/02/02 07:34:10, ramosian.glider wrote:
> Do you still need NOLINT here?
Yes, lint suggests to replace strcpy with snprintf otherwise.

http://codereview.appspot.com/5609049/diff/1/asan_interceptors.h
File asan_interceptors.h (right):

http://codereview.appspot.com/5609049/diff/1/asan_interceptors.h#newcode26
asan_interceptors.h:26: // you want to use it in other parts of RTL,
you'll need to
On 2012/02/02 07:34:10, ramosian.glider wrote:
> either add a colon after "to", or remove it from other places.

Done.

http://codereview.appspot.com/5609049/diff/1/asan_interceptors.h#newcode66
asan_interceptors.h:66: FUNC_TYPE(func) REAL(func); \
On 2012/02/02 07:34:10, ramosian.glider wrote:
> Do you need DEFINE_REAL? Looks like DECLARE_REAL covers all the
possible use
> cases.

Added the comment, and removed one of its two usages. I'll leave it
here, since it's present in INTERCEPTOR body.

http://codereview.appspot.com/5609049/diff/1/asan_mac.cc
File asan_mac.cc (right):

http://codereview.appspot.com/5609049/diff/1/asan_mac.cc#newcode464
asan_mac.cc:464: dispatch_queue_t dq, void *ctxt,
On 2012/02/02 07:34:10, ramosian.glider wrote:
> Please make sure the indentations are correct. I think they are not
now.

Done.

http://codereview.appspot.com/5609049/diff/1/asan_mac.h
File asan_mac.h (right):

http://codereview.appspot.com/5609049/diff/1/asan_mac.h#newcode59
asan_mac.h:59: CFAllocatorRef alloc,
On 2012/02/02 07:34:10, ramosian.glider wrote:
> Mind the indentation.

Done (need to separate function name and arguments somehow).

http://codereview.appspot.com/5609049/



More information about the llvm-commits mailing list