1// RUN: %clang_cl_asan %Od %s %Fe%t
2// RUN: not %run %t 2>&1 | FileCheck %s
3// REQUIRES: asan-32-bits
4
5#include <stdio.h>
6
7char bigchunk[1 << 30];
8
9int main() {
10 printf(format: "Hello, world!\n");
11 scanf(format: "%s", bigchunk);
12// CHECK-NOT: Hello, world!
13// CHECK: Shadow memory range interleaves with an existing memory mapping.
14// CHECK: ASan shadow was supposed to be located in the [0x2fff0000-0x{{.*}}ffff] range.
15// CHECK: Dumping process modules:
16// CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}shadow_mapping_failure
17// CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}ntdll.dll
18}
19

source code of compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp