[LVI] Add trunc to i1 handling. (#124480)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / null_deref.cpp
blob6582bac9e69e306a09f79e605f74ab6592e5ee17
1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2 // FIXME: merge this with the common null_deref test when we can run common
3 // tests on Windows.
5 __attribute__((noinline))
6 static void NullDeref(int *ptr) {
7 // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
8 // CHECK: {{0x0*000.. .*pc 0x.*}}
9 ptr[10]++; // BOOM
11 int main() {
12 NullDeref((int*)0);
13 // CHECK: {{ #1 0x.* in main.*null_deref.cpp:}}[[@LINE-1]]:3
14 // CHECK: AddressSanitizer can not provide additional info.