• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2 
3 // REQUIRES: !android
4 
5 #include <assert.h>
6 #include <strings.h>
7 
main(int argc,char * argv[])8 int main(int argc, char *argv[]) {
9   char buf[100];
10   // *& to suppress bzero-to-memset optimization.
11   (*&bzero)(buf, sizeof(buf) + 1);
12   // CHECK:      AddressSanitizer: stack-buffer-overflow
13   // CHECK-NEXT: WRITE of size 101 at
14   return 0;
15 }
16