brintos

brintos / llvm-project-archived public Read only

0
0
Text · 491 B · 5df611b Raw
19 lines · cpp
1// RUN: %clangxx_memprof %s -o %t2 3// RUN: %env_memprof_opts=print_text=true:log_path=stdout:handle_abort=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-TEXT %s4 5#include <stdlib.h>6#include <string.h>7int main(int argc, char **argv) {8  char *x = (char *)malloc(10);9  memset(x, 0, 10);10  free(x);11  abort();12  return 0;13}14 15// CHECK-TEXT: MemProfiler:DEADLYSIGNAL16// CHECK-TEXT: Recorded MIBs (incl. live on exit):17// CHECK-TEXT: Memory allocation stack id18// CHECK-TEXT: Stack for id19