• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check that ASan can print reproducer cmdline for failed binary if desired.
2 //
3 // RUN: %clang_asan %s -o %t-exe
4 //
5 // RUN: env not %run %t-exe 2>&1 | FileCheck %s
6 // RUN: %env_asan_opts=print_cmdline=false not %run %t-exe 2>&1 | FileCheck %s
7 // RUN: %env_asan_opts=print_cmdline=true not %run %t-exe first second/third [fourth] 2>&1 | FileCheck %s --check-prefix CHECK-PRINT
8 
9 volatile int ten = 10;
10 
main()11 int main() {
12   char x[10];
13   // CHECK-NOT: Command:
14   // CHECK-PRINT: {{Command: .*-exe first second/third \[fourth\]}}
15   x[ten] = 1; // BOOM
16   return  0;
17 }
18 
19