1 // Tests trace pc guard coverage collection.
3 // REQUIRES: x86_64-linux
6 // RUN: rm -rf %t_workdir
7 // RUN: mkdir -p %t_workdir
9 /// In glibc 2.39+, fprintf has a nonnull attribute. Disable nonnull-attribute,
10 /// which would increase counters for ubsan.
11 // RUN: %clangxx -O0 -fsanitize-coverage=trace-pc-guard -fno-sanitize=nonnull-attribute %s -o %t
12 // RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s
13 // RUN: rm -rf %t_workdir
18 fprintf(stderr
, "foo\n");
23 fprintf(stderr
, "main\n");
29 // CHECK: SanitizerCoverage: ./sanitizer_coverage_symbolize.{{.*}}.sancov: 2 PCs written