xref: /llvm-project/compiler-rt/test/scudo/stats.c (revision f7c5c0d87b8ae5e55006fd3a31994cd68d64f102)
1 // RUN: %clang_scudo %s -o %t
2 // RUN: %run %t 2>&1 | FileCheck %s
3 
4 // Tests that the allocator stats printing function exists and outputs
5 // "something". Currently that "something" is fairly nebulous, as the 32-bit
6 // primary doesn't output anything, and for the 64-bit one it's highly dependent
7 // on the size class map and potential library allocations. So keep it very
8 // generic for now.
9 
10 #include <stdlib.h>
11 
12 #include <sanitizer/scudo_interface.h>
13 
main(int argc,char ** argv)14 int main(int argc, char **argv) {
15   free(malloc(1U));
16   __scudo_print_stats();
17   return 0;
18 }
19 
20 // CHECK: Stats:
21