1 // Test for disabling LSan at link-time.
2 // RUN: %clangxx_lsan %s -o %t
3 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t
4 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s
8 #include <sanitizer/lsan_interface.h>
13 int __attribute__((used
)) __lsan_is_turned_off() {
14 return (argc_copy
== 1);
18 int main(int argc
, char *argv
[]) {
19 volatile int *x
= new int;
25 // CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)