about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-07-04 15:46:57 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2014-07-04 18:52:53 +0100
commitbebc77433b86a2e9a38847c3189d63ca84f90e99 (patch)
treecd119f23e5577fbbb6b8abaf888273616f5c88e0 /lib/Core
parent6ae1a8a7d100019a97b96ad9bd0dcba273c6f7e8 (diff)
downloadklee-bebc77433b86a2e9a38847c3189d63ca84f90e99.tar.gz
Fix regression reported by Michael Esser and Andrew Watson
(independently).

In our recently switch to llvm::raw_ostream (and friends) (I think this
is d934d983692c8952cdb887cbcd59f2df0001b9c0) we forgot to flush the
llvm::raw_string_ostream to the underlying string used for error report
files (e.g. test000001.overshift.err) so we would end up writing an
empty string to error report files.

Also added a test case to catch this.
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index fcdf8a6d..f31d6aeb 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2808,7 +2808,8 @@ void Executor::terminateStateOnError(ExecutionState &state,
     std::string info_str = info.str();
     if (info_str != "")
       msg << "Info: \n" << info_str;
-    interpreterHandler->processTestCase(state, MsgString.c_str(), suffix);
+
+    interpreterHandler->processTestCase(state, msg.str().c_str(), suffix);
   }
     
   terminateState(state);