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

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

volatile int *null = 0;

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

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