aboutsummaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Posix/illegal_read_test.cc
blob: 9615d7132da5e6e260ad9a1f587ee56064264bc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test that there was an illegal READ memory access.
// RUN: %clangxx -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s

// REQUIRES: stable-runtime
// XFAIL: powerpc64, s390x

volatile int *null = 0;
volatile int a;

int main(int argc, char **argv) {
  a = *null;
  return 0;
}

// CHECK: The signal is caused by a READ memory access.