annotate compiler-rt/test/scudo/stats.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 79ff65ed7e25
children
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
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
14 int main(int argc, char **argv) {
150
anatofuz
parents:
diff changeset
15 free(malloc(1U));
anatofuz
parents:
diff changeset
16 __scudo_print_stats();
anatofuz
parents:
diff changeset
17 return 0;
anatofuz
parents:
diff changeset
18 }
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 // CHECK: Stats: