You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
382 B
16 lines
382 B
4 months ago
|
// 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;
|
||
|
}
|