1 // Ensure that output is the same but exit code depends on halt_on_error value
2 // RUN: %clangxx_asan %s -o %t
3 // RUN: %env_asan_opts="halt_on_error=0" %run %t 2>&1 | FileCheck %s
4 // RUN: %env_asan_opts="halt_on_error=1" not %run %t 2>&1 | FileCheck %s
5 // RUN: not %run %t 2>&1 | FileCheck %s
6 // REQUIRES: leak-detection
7 // UNSUPPORTED: android
12 volatile int *a
= (int *)malloc(20);
22 // CHECK: LeakSanitizer: detected memory leaks