[PATCH] TraceConverter.cc: Fix Uncaught exception issue

Ryan Long ryan.long at oarcorp.com
Mon Dec 13 13:47:44 UTC 2021


CID 1471639: Uncaught exception

Closes #4501
---
 tester/covoar/TraceConverter.cc | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc
index 8e30ae5..2c5330a 100644
--- a/tester/covoar/TraceConverter.cc
+++ b/tester/covoar/TraceConverter.cc
@@ -87,14 +87,30 @@ int main(
   std::string                         tracefile;
   std::string                         logname = "/tmp/qemu.log";
   Coverage::ExecutableInfo*           executableInfo;
-  rld::process::tempfile              objdumpFile( ".dmp" );
-  rld::process::tempfile              err( ".err" );
   Coverage::DesiredSymbols            symbolsToAnalyze;
   bool                                verbose = false;
   std::string                         dynamicLibrary;
   int                                 ec = 0;
   std::shared_ptr<Target::TargetBase> targetInfo;
 
+  try
+  {
+    rld::process::tempfile objdumpFile( ".dmp" );
+  }
+  catch ( rld::error re )
+  {
+    std::cerr << "Failed to make .dmp tempfile " << std::endl;
+  }
+
+  try
+  {
+    rld::process::tempfile err( ".err" );
+  }
+  catch ( rld::error re )
+  {
+    std::cerr << "Failed to make .err tempfile " << std::endl;
+  }
+
   setup_signals();
 
    //
-- 
1.8.3.1



More information about the devel mailing list