blob: 430edb74469240cae38e7e2ce52faed9b0e3c3b3 [file] [log] [blame]
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
// REQUIRES: !android
#include <assert.h>
#include <strings.h>
int main(int argc, char *argv[]) {
char buf[100];
// *& to suppress bzero-to-memset optimization.
(*&bzero)(buf, sizeof(buf) + 1);
// CHECK: AddressSanitizer: stack-buffer-overflow
// CHECK-NEXT: WRITE of size 101 at
return 0;
}