20 lines · cpp
1// Regression test:2// https://code.google.com/p/address-sanitizer/issues/detail?id=2573// RUN: %clangxx_lsan %s -o %t && %run %t 2>&1 | FileCheck %s4 5#include <stdio.h>6 7struct T {8 ~T() { printf("~T\n"); }9};10 11T *t;12 13int main(int argc, char **argv) {14 t = new T[argc - 1];15 printf("OK\n");16}17 18// CHECK: OK19 20