[PATCH] D18397: [sanitizer] Add strnlen to the common interceptors

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 10:29:07 PDT 2016

samsonov accepted this revision.
samsonov added a comment.
This revision is now accepted and ready to land.

LGTM with a nit below.

Comment at: lib/asan/asan_interceptors.cc:114
@@ -113,3 +113,3 @@
 static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) {
   if (REAL(strnlen)) {
I think SANITIZER_INTERCEPT_STRNLEN will not be defined at this point (sanitizer_common/sanitizer_common_interceptors.inc is #included later). Maybe we can just delete this terrible function and use internal_strnlen() everywhere instead. It won't be that much of a slowdown.


More information about the llvm-commits mailing list