[PATCH] More string interceptors: strstr, strcasestr, strcspn, strpbrk

Dmitry Vyukov dvyukov at google.com
Tue May 26 11:12:50 PDT 2015


thanks, the code is now much easier to understand
LGTM


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:276
@@ +275,3 @@
+static inline void StrstrCheck(void *ctx, char *r, const char *s1,
+                               const char *s2 ) {
+    uptr len1 = REAL(strlen)(s1);
----------------
remove whitespace after s2

================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:318
@@ +317,3 @@
+#if SANITIZER_INTERCEPT_STRCSPN
+INTERCEPTOR(SIZE_T, strcspn, const char *s1, const char *s2) {
+  void *ctx;
----------------
please add strspn interceptor for completeness

http://reviews.llvm.org/D9017

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list