[PATCH] D17479: [sanitizer] Move recvmsg and recv interceptors to sanitizer_common.
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 07:00:12 PST 2016
dvyukov added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:5359
@@ +5358,3 @@
+ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, buf, len);
+ COMMON_INTERCEPTOR_UNPOISON_PARAM(5);
+ }
----------------
m.ostapenko wrote:
> dvyukov wrote:
> > this is different from what msan did
> > why?
> You are right. This is msan specific code, so perhaps we could wrap the whole if to macro (say, COMMON_INTERCEPTOR_UNPOISON_COND) and define it like this:
> ```
> #define COMMON_INTERCEPTOR_UNPOISON_COND(srcaddr, sz, srcaddr_sz) \
> do { \
> if (srcaddr) { \
> SIZE_T sz = *addrlen; \
> __msan_unpoison(srcaddr, Min(sz, srcaddr_sz)); \
> } \
> } while (false)
> ```
> for msan and empty macros for others (just like COMMON_INTERCEPTOR_UNPOISON_PARAM)?
__msan_unpoison(srcaddr, Min(sz, *addrlen)) looks simpler to me
Repository:
rL LLVM
http://reviews.llvm.org/D17479
More information about the llvm-commits
mailing list