1 // Verify that objects passed by value get red zones and that the copy
2 // constructor is called.
3 // RUN: %clangxx_asan -O0 %s -o %t
4 // RUN: not %run %t 2>&1 | FileCheck %s --implicit-check-not \
5 // RUN: Assertion{{.*}}failed
7 // ASan instrumentation can't insert red-zones around inalloca parameters.
8 // XFAIL: target={{.*windows-msvc.*}} && asan-32-bits
15 A(const A
&other
) : me(this) {
16 for (int i
= 0; i
< 8; ++i
) a
[i
] = other
.a
[i
];
24 int *volatile ptr
= &a
->a
[0];
38 // CHECK: ERROR: AddressSanitizer: stack-buffer-overflow
39 // CHECK: READ of size 4 at
40 // CHECK: is located in stack of thread