Files
clang-p2996/compiler-rt/test/asan/TestCases/on_error_callback.cc
Timur Iskhodzhanov 7f29181323 [ASan tests] Exclude some tests from Windows runs
Some features are not supported yet and some are not planned to be fixed soon

llvm-svn: 209733
2014-05-28 13:06:14 +00:00

20 lines
395 B
C++

// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
// FIXME: __asan_on_error() is not supported on Windows yet.
// XFAIL: win32
#include <stdio.h>
#include <stdlib.h>
extern "C"
void __asan_on_error() {
fprintf(stderr, "__asan_on_error called");
}
int main() {
char *x = (char*)malloc(10 * sizeof(char));
free(x);
return x[5];
// CHECK: __asan_on_error called
}