[compiler-rt] r305026 - [sanitizer-coverage] one more flavor of coverage: -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. Reapplying revisions 304630, 304631, 304632, 304673, see PR33308
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 15:58:20 PDT 2017
Author: kcc
Date: Thu Jun 8 17:58:19 2017
New Revision: 305026
URL: http://llvm.org/viewvc/llvm-project?rev=305026&view=rev
Log:
[sanitizer-coverage] one more flavor of coverage: -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. Reapplying revisions 304630, 304631, 304632, 304673, see PR33308
Added:
compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
Added: compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc?rev=305026&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc (added)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc Thu Jun 8 17:58:19 2017
@@ -0,0 +1,23 @@
+// Tests -fsanitize-coverage=inline-8bit-counters
+//
+// REQUIRES: has_sancovcc,stable-runtime
+// UNSUPPORTED: i386-darwin, x86_64-darwin
+//
+// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1
+
+#include <stdio.h>
+#include <assert.h>
+
+const char *first_counter;
+
+extern "C"
+void __sanitizer_cov_8bit_counters_init(const char *start, const char *end) {
+ printf("INIT: %p %p\n", start, end);
+ assert(end - start > 1);
+ first_counter = start;
+}
+
+int main() {
+ assert(first_counter);
+ assert(*first_counter == 1);
+}
More information about the llvm-commits
mailing list