1 // Tests the default implementation of callbacks for
2 // -fsanitize-coverage=inline-8bit-counters,pc-table
4 // REQUIRES: has_sancovcc,stable-runtime,linux,x86_64-target-arch
6 // RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters,pc-table -o %t
7 // RUN: rm -f %t-counters %t-pcs
8 // RUN: env %tool_options="cov_8bit_counters_out=%t-counters cov_pcs_out=%t-pcs verbosity=1" %run %t 2>&1 | FileCheck %s
10 // Check the file sizes
11 // RUN: wc -c %t-counters | grep "^2 "
12 // RUN: wc -c %t-pcs | grep "^32 "
16 __attribute__((noinline
)) void foo() {}
20 fprintf(stderr
, "PASS\n");
22 // CHECK: cov_8bit_counters_out: written {{.*}} bytes to {{.*}}-counter
23 // CHECK: cov_pcs_out: written {{.*}} bytes to {{.*}}-pcs