[PATCH] D16070: [asan] Optionally print reproducer cmdline in ASan reports.
    Yury Gribov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jan 11 09:13:52 PST 2016
    
    
  
ygribov added inline comments.
================
Comment at: lib/asan/asan_report.cc:243
@@ +242,3 @@
+  char **argv, **envp;
+  __sanitizer::GetArgsAndEnv(&argv, &envp);
+
----------------
This will leak memory (not sure if it's important).
================
Comment at: lib/asan/asan_report.cc:246
@@ +245,3 @@
+  Printf("\nReproducer cmdline: ");
+  for (int i = 0; argv[i] != 0; ++i)
+    Printf("%s ", argv[i]);
----------------
size_t?
================
Comment at: lib/sanitizer_common/sanitizer_common.h:285
@@ -284,2 +284,3 @@
 void ReExec();
+void GetArgsAndEnv(char*** argv, char*** envp);
 bool StackSizeIsUnlimited();
----------------
Stars bind to right.
Repository:
  rL LLVM
http://reviews.llvm.org/D16070
    
    
More information about the llvm-commits
mailing list