brintos

brintos / llvm-project-archived public Read only

0
0
Text · 353 B · a525b0c Raw
15 lines · cpp
1// RUN: %clangxx_msan -O0 %s -o %t && %run %t >%t.out 2>&12// FileCheck %s <%t.out3 4#include <sanitizer/msan_interface.h>5#include <stdio.h>6#include <string.h>7 8int main(int argc, char **argv) {9  char *str;10  sscanf("#string#", "%ms", &str);11  printf("str = %s\n", str);12  __msan_check_mem_is_initialized(str, strlen(str) + 1);13  // CHECK: #string#14}15