[PATCH] D27659: [sanitizer] intercept bstring functions

Kuang-che Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 08:46:37 PST 2016


kcwu added a comment.

In https://reviews.llvm.org/D27659#624707, @kcc wrote:

> please see internal b/33656003 about what went wrong with this patch (other than the Mac failure).
>  Also I've noticed that  bzer_test.cc does not actually test anything -- it passes w/o the patch. 
>  Probably you explained it here: https://github.com/google/sanitizers/issues/750#issuecomment-266262859


bzero_test.cc is easy to fix (adding -std=c99). But I am not sure how to properly fix the problem of WRAP though.  Does following approach work?

Proposal: a separate CL dedicated for WRAP() issue.

1. extract the body of "INTERCEPTOR(void*, memcpy, void *dst, const void *src, uptr size) {"

to a macro.

2. replace all WRAP(memcpy) by the macro.
3. repeat for others functions WRAP(*).

Any suggestions?


https://reviews.llvm.org/D27659





More information about the llvm-commits mailing list