Files
clang-p2996/compiler-rt/test/asan/TestCases/on_error_callback.cc
Alexey Samsonov 9f20d67034 Move ASan lit-tests under test/asan
llvm-svn: 201413
2014-02-14 14:06:10 +00:00

17 lines
312 B
C++

// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s
#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
}