annotate compiler-rt/test/scudo/stats.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_scudo %s -o %t
anatofuz
parents:
diff changeset
2 // RUN: %run %t 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Tests that the allocator stats printing function exists and outputs
anatofuz
parents:
diff changeset
5 // "something". Currently that "something" is fairly nebulous, as the 32-bit
anatofuz
parents:
diff changeset
6 // primary doesn't output anything, and for the 64-bit one it's highly dependent
anatofuz
parents:
diff changeset
7 // on the size class map and potential library allocations. So keep it very
anatofuz
parents:
diff changeset
8 // generic for now.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #include <stdlib.h>
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 #include <sanitizer/scudo_interface.h>
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 int main(int argc, char **argv)
anatofuz
parents:
diff changeset
15 {
anatofuz
parents:
diff changeset
16 free(malloc(1U));
anatofuz
parents:
diff changeset
17 __scudo_print_stats();
anatofuz
parents:
diff changeset
18 return 0;
anatofuz
parents:
diff changeset
19 }
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // CHECK: Stats: