Redirect output after taking snapshots
authorweiyu <weiyuluo1232@gmail.com>
Tue, 25 Feb 2020 03:13:44 +0000 (19:13 -0800)
committerweiyu <weiyuluo1232@gmail.com>
Tue, 25 Feb 2020 03:13:44 +0000 (19:13 -0800)
model.cc

index 5b5ccf7..f8f1259 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -85,7 +85,6 @@ ModelChecker::ModelChecker() :
        parse_options(&params);
        initRaceDetector();
        /* Configure output redirection for the model-checker */
-       redirect_output();
        install_trace_analyses(get_execution());
        install_handler();
 }
@@ -294,6 +293,7 @@ void ModelChecker::finish_execution(bool more_executions)
        execution_number ++;
        if (more_executions)
                reset_to_initial_state();
+
        history->set_new_exec_flag();
 }
 
@@ -384,6 +384,8 @@ static void runChecker() {
 void ModelChecker::startChecker() {
        startExecution(get_system_context(), runChecker);
        snapshot = take_snapshot();
+
+       redirect_output();
        initMainThread();
 }