1 | // RUN: %clangxx_memprof %s -o %t |
2 | |
3 | // RUN: %env_memprof_opts=print_text=true:log_path=stdout:handle_abort=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-TEXT %s |
4 | |
5 | #include <stdlib.h> |
6 | #include <string.h> |
7 | int main(int argc, char **argv) { |
8 | char *x = (char *)malloc(size: 10); |
9 | memset(s: x, c: 0, n: 10); |
10 | free(ptr: x); |
11 | abort(); |
12 | return 0; |
13 | } |
14 | |
15 | // CHECK-TEXT: MemProfiler:DEADLYSIGNAL |
16 | // CHECK-TEXT: Recorded MIBs (incl. live on exit): |
17 | // CHECK-TEXT: Memory allocation stack id |
18 | // CHECK-TEXT: Stack for id |
19 | |