xref: /llvm-project/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp (revision 3c1aa20c63548c77ddce3dabc7b25c7c7edccaac)
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 
7 char bigchunk[1 << 30];
8 
main()9 int main() {
10   printf("Hello, world!\n");
11   scanf("%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