[PATCH] D33804: bugpoint: Prototype disabling symbolication of bugpoint-executed programs

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 20:12:02 PDT 2017


chandlerc added a comment.

I'm pretty happy to start simple with a flag and go from there.



================
Comment at: lib/Support/Signals.cpp:39-42
+static cl::opt<bool>
+    DisableSymbolication("disable-symbolication",
+                         cl::desc("Disable symbolizing crash backtraces."),
+                         cl::init(false), cl::Hidden);
----------------
Especially because this is initialized to false initially, I think it'll be fine even if we crash in weird places.


================
Comment at: tools/bugpoint/ToolRunner.cpp:66-67
   const StringRef *Redirects[3] = {&StdInFile, &StdOutFile, &StdErrFile};
-  return sys::ExecuteAndWait(ProgramPath, Args, nullptr, Redirects, NumSeconds,
+  std::vector<const char*> Env = {"LLVM_DISABLE_SYMBOLICATION"};
+  return sys::ExecuteAndWait(ProgramPath, Args, Env.data(), Redirects, NumSeconds,
                              MemoryLimit, ErrMsg);
----------------
I assume this was just an experiment?


================
Comment at: tools/bugpoint/ToolRunner.cpp:85-88
+  std::vector<const char*> Env = {"LLVM_DISABLE_SYMBOLICATION"};
+
   // Run the program remotely with the remote client
+  int ReturnCode = sys::ExecuteAndWait(RemoteClientPath, Args, Env.data(),
----------------
same...


https://reviews.llvm.org/D33804





More information about the llvm-commits mailing list