[PATCH] D34827: Add end-to-end tests for overflows of byval arguments.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 15:57:19 PDT 2017


eugenis accepted this revision.
eugenis added inline comments.
This revision is now accepted and ready to land.


================
Comment at: compiler-rt/test/asan/TestCases/pass-object-byval.cc:4
+// RUN: %clangxx_asan -O0 %s -o %t
+// RUN: not %run %t 2>&1 | FileCheck %s --implicit-check-not \
+// RUN:     Assertion{{.*}}failed
----------------
> --implicit-check-not
 Nice!


================
Comment at: compiler-rt/test/asan/TestCases/pass-struct-byval-uar.cc:28
+// CHECK-NO-UAR-NOT: WRITE of size 4 at
+// CHECK-NO-UAR-NOT: Memory access at offset {{[0-9]+}} is inside this variable
+//
----------------
Don't need that many -NOT checks. This would be enough:
// CHECK-NO-UAR-NOT: ERROR: AddressSanitizer

Also I'm not sure the NO-UAR case is necessary at all. You are effectively testing undefined behavior.



https://reviews.llvm.org/D34827





More information about the llvm-commits mailing list