[PATCH] D30384: [asan] Add an interceptor for strtok

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 18:44:51 PDT 2017


alekseyshl added inline comments.


================
Comment at: test/asan/TestCases/strtok.c:12
+// RUN: %env_asan_opts=intercept_strtok=false:intercept_strlen=false %run %t test4 2>&1
+// RUN: %clang_asan %s -o %t && %env_asan_opts=strict_string_checks=false not %run %t test5 2>&1 | FileCheck %s --check-prefix=CHECK5
+// RUN: %env_asan_opts=intercept_strtok=false:intercept_strlen=false %run %t test5 2>&1
----------------
And, if we go with one file, please wrap these long lines like this:

// RUN: ... | \
// RUN:     FileCheck ...


================
Comment at: test/asan/TestCases/strtok.c:22
+
+// test overflow in delimiter
+void test1() {
----------------
kcc wrote:
> alekseyshl wrote:
> > Why other tests do not have comments? Please split them into separate files and add a top line comment explaining what exactly is tested.
> Not worth it, IMHO
> But what I did miss is that this test does "%clang_asan %s -o %t" 5 times, while 1 is enough. 
Ok, fine, one file is acceptable too, but still, comments would be much welcomed!


https://reviews.llvm.org/D30384





More information about the llvm-commits mailing list