1 // RUN: %clangxx_asan -O0 -fsanitize-address-field-padding=1 %s -o %t
2 // RUN: not %run %t 11 2>&1 | FileCheck %s
6 // REQUIRES: asan-64-bits, shadow-scale-3
7 // FIXME: Implement ASan intra-object padding in Clang's MS record layout
8 // UNSUPPORTED: target={{.*windows-msvc.*}}
13 Foo() : pre1(1), pre2(2), post1(3), post2(4) {
17 void set(int i
, int val
) { a
[i
] = val
; }
18 // CHECK: ERROR: AddressSanitizer: intra-object-overflow
19 // CHECK: #0 {{.*}}Foo::set{{.*}}intra-object-overflow.cpp:[[@LINE-2]]
26 int main(int argc
, char **argv
) {
27 int idx
= argc
== 2 ? atoi(argv
[1]) : 0;
30 // CHECK: #1 {{.*}}main{{.*}}intra-object-overflow.cpp:[[@LINE-1]]
31 // CHECK: is located 84 bytes inside of 128-byte region