brintos

brintos / llvm-project-archived public Read only

0
0
Text · 319 B · c72426c Raw
16 lines · cpp
1// REQUIRES: gwp_asan2// RUN: %clangxx_gwp_asan %s -o %t3// RUN: %expect_crash %run %t 2>&1 | FileCheck %s4 5#include <cstdlib>6 7int main() {8  // CHECK: GWP-ASan detected a memory error9  // CHECK: Double Free at 0x{{[a-f0-9]+}} (a 10-byte allocation)10  void *Ptr = malloc(10);11 12  free(Ptr);13  free(Ptr);14  return 0;15}16