[compiler-rt] r246171 - Unit test the CRLF change to suppression parsing
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 11:05:33 PDT 2015
Author: rnk
Date: Thu Aug 27 13:05:33 2015
New Revision: 246171
URL: http://llvm.org/viewvc/llvm-project?rev=246171&view=rev
Log:
Unit test the CRLF change to suppression parsing
It's a simpler, faster, and more portable.
Removed:
compiler-rt/trunk/test/asan/TestCases/Windows/suppressions-crlf.cc
Modified:
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc?rev=246171&r1=246170&r2=246171&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_suppressions_test.cc Thu Aug 27 13:05:33 2015
@@ -105,9 +105,10 @@ TEST_F(SuppressionContextTest, Parse3) {
ctx_.Parse(
"# last suppression w/o line-feed\n"
"race:foo\n"
- "race:bar"
+ "race:bar\r\n"
+ "race:baz"
); // NOLINT
- CheckSuppressions(2, {"race", "race"}, {"foo", "bar"});
+ CheckSuppressions(3, {"race", "race", "race"}, {"foo", "bar", "baz"});
}
TEST_F(SuppressionContextTest, ParseType) {
Removed: compiler-rt/trunk/test/asan/TestCases/Windows/suppressions-crlf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/suppressions-crlf.cc?rev=246170&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/suppressions-crlf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/suppressions-crlf.cc (removed)
@@ -1,18 +0,0 @@
-// Try a strlen suppression, but force the input file to be DOS format (CRLF).
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: python -c 'import sys; sys.stdout.write("interceptor_name:strlen\r\n")' > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main() {
- char *a = (char *)malloc(6);
- free(a);
- size_t len = strlen(a); // BOOM
- fprintf(stderr, "strlen ignored, len = %zu\n", len);
-}
-
-// CHECK-NOT: AddressSanitizer: heap-use-after-free
-// CHECK: strlen ignored
More information about the llvm-commits
mailing list