about summary refs log tree commit diff homepage
path: root/lib/Solver
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2016-08-04 17:00:01 +0100
committerAndrea Mattavelli <andreamattavelli@gmail.com>2016-09-26 12:14:20 +0100
commit2fdd5aa8fc01e3d5c1ff66adf03b6dbb8e427ecd (patch)
tree2aa879f4c2285644ad36df334a6fa7f1922b427f /lib/Solver
parent1823ab801b50e781c18cff67cb8cda0d7859519e (diff)
downloadklee-2fdd5aa8fc01e3d5c1ff66adf03b6dbb8e427ecd.tar.gz
Modified logging information to steer the usage of klee_message, klee_warning, and klee_error
Diffstat (limited to 'lib/Solver')
-rw-r--r--lib/Solver/MetaSMTSolver.cpp6
-rw-r--r--lib/Solver/Z3Solver.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Solver/MetaSMTSolver.cpp b/lib/Solver/MetaSMTSolver.cpp
index 411c07b1..6bfd79c1 100644
--- a/lib/Solver/MetaSMTSolver.cpp
+++ b/lib/Solver/MetaSMTSolver.cpp
@@ -397,9 +397,9 @@ MetaSMTSolverImpl<SolverContext>::runAndGetCexForked(
     // "occasion" return a status when the process was terminated by a
     // signal, so test signal first.
     if (WIFSIGNALED(status) || !WIFEXITED(status)) {
-      fprintf(stderr,
-              "error: metaSMT did not return successfully (status = %d) \n",
-              WTERMSIG(status));
+      klee_warning(
+          "error: metaSMT did not return successfully (status = %d) \n",
+          WTERMSIG(status));
       return (SolverImpl::SOLVER_RUN_STATUS_INTERRUPTED);
     }
 
diff --git a/lib/Solver/Z3Solver.cpp b/lib/Solver/Z3Solver.cpp
index 96a7dafa..1cbca566 100644
--- a/lib/Solver/Z3Solver.cpp
+++ b/lib/Solver/Z3Solver.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 #include "klee/Config/config.h"
+#include "klee/Internal/Support/ErrorHandling.h"
 #ifdef ENABLE_Z3
 #include "Z3Builder.h"
 #include "klee/Constraints.h"
@@ -285,8 +286,7 @@ SolverImpl::SolverRunStatus Z3SolverImpl::handleSolverResponse(
     if (strcmp(reason, "unknown") == 0) {
       return SolverImpl::SOLVER_RUN_STATUS_FAILURE;
     }
-    llvm::errs() << "Unexpected solver failure. Reason is \"" << reason
-                 << "\"\n";
+    klee_warning("Unexpected solver failure. Reason is \"%s,\"\n", reason);
     abort();
   }
   default: