From bebc77433b86a2e9a38847c3189d63ca84f90e99 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Fri, 4 Jul 2014 15:46:57 +0100 Subject: 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. --- lib/Core/Executor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Core') 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); -- cgit 1.4.1