about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2020-02-06 16:44:05 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-03-02 13:23:12 +0000
commit6403bd6549c4933f1e33c9bb190d5468a953f6bd (patch)
tree192cd8db8f324d21aec5a1c80f10c605c625e78a /lib
parent12b98c895f2bac07e3407c5bd07b04649d283cc0 (diff)
downloadklee-6403bd6549c4933f1e33c9bb190d5468a953f6bd.tar.gz
stats: enforce table creation
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/StatsTracker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 76ed9e08..20944061 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -252,6 +252,9 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename,
       klee_error("%s", sqlite3ErrToStringAndFree("Can't set options for database: ", zErrMsg).c_str());
     }
 
+    // create table
+    writeStatsHeader();
+
     // begin transaction
     auto rc = sqlite3_step(transactionBeginStmt);
     if (rc != SQLITE_DONE) {
@@ -259,8 +262,6 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename,
     }
     sqlite3_reset(transactionBeginStmt);
 
-    // create table
-    writeStatsHeader();
     writeStatsLine();
 
     if (statsWriteInterval)