brintos

brintos / llvm-project-archived public Read only

0
0
Text · 560 B · 8c83bd9 Raw
19 lines · cpp
1// Check that ASan can print reproducer cmdline for failed binary if desired.2//3// RUN: %clang_asan %s -o %t-exe4//5// RUN: env not %run %t-exe 2>&1 | FileCheck %s6// RUN: %env_asan_opts=print_cmdline=false not %run %t-exe 2>&1 | FileCheck %s7// RUN: %env_asan_opts=print_cmdline=true not %run %t-exe first second/third [fourth] 2>&1 | FileCheck %s --check-prefix CHECK-PRINT8 9volatile int ten = 10;10 11int main() {12  char x[10];13  // CHECK-NOT: Command:14  // CHECK-PRINT: {{Command: .*-exe first second/third \[fourth\]}}15  x[ten] = 1; // BOOM16  return  0;17}18 19