Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc
// RUN: %clangxx_asan -O0 -fsanitize-address-field-padding=1 %s -o %t | // RUN: %clangxx_asan -O0 -fsanitize-address-field-padding=1 %s -o %t | ||||
// RUN: not %run %t 11 2>&1 | FileCheck %s | // RUN: not %run %t 11 2>&1 | FileCheck %s | ||||
// RUN: %run %t 10 | // RUN: %run %t 10 | ||||
// | // | ||||
// FIXME: fix 32-bits. | // FIXME: fix 32-bits. | ||||
// REQUIRES: asan-64-bits | // REQUIRES: asan-64-bits, shadow-scale-3 | ||||
// FIXME: Implement ASan intra-object padding in Clang's MS record layout | // FIXME: Implement ASan intra-object padding in Clang's MS record layout | ||||
// UNSUPPORTED: win32 | // UNSUPPORTED: win32 | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
class Foo { | class Foo { | ||||
public: | public: | ||||
Foo() : pre1(1), pre2(2), post1(3), post2(4) { | Foo() : pre1(1), pre2(2), post1(3), post2(4) { | ||||
} | } | ||||
Show All 19 Lines |