brintos

brintos / llvm-project-archived public Read only

0
0
Text · 395 B · cb319a6 Raw
17 lines · cpp
1// RUN: %clangxx_msan -O0 %s -o %t && %run %t2 3// REQUIRES: !android4 5#include <assert.h>6#include <strings.h>7#include <sanitizer/msan_interface.h>8 9int main(int argc, char *argv[]) {10  char buf[100];11  assert(0 == __msan_test_shadow(buf, sizeof(buf)));12  // *& to suppress bzero-to-memset optimization.13  (*&bzero)(buf, 50);14  assert(50 == __msan_test_shadow(buf, sizeof(buf)));15  return 0;16}17