summaryrefslogtreecommitdiff
path: root/src/expr/expr_manager_template.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-02-26 21:18:14 +0000
committerMorgan Deters <mdeters@gmail.com>2011-02-26 21:18:14 +0000
commit5c9af4e1382d32352aae7f8c31795831882931b2 (patch)
tree08580119dc6ace9db64468c6af4c51e1d0d5b31b /src/expr/expr_manager_template.cpp
parent956689a007e6ae107a47a3b5ea4ea683d3bce673 (diff)
fix serious regression breakage (segfaults) caused by an off-by-one error in initialization of the expression variable statistics in last commit
Diffstat (limited to 'src/expr/expr_manager_template.cpp')
-rw-r--r--src/expr/expr_manager_template.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/expr_manager_template.cpp b/src/expr/expr_manager_template.cpp
index 65429c87f..b60876967 100644
--- a/src/expr/expr_manager_template.cpp
+++ b/src/expr/expr_manager_template.cpp
@@ -75,7 +75,7 @@ ExprManager::ExprManager() :
for (unsigned i = 0; i < kind::LAST_KIND; ++ i) {
d_exprStatistics[i] = NULL;
}
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
d_exprStatisticsVars[i] = NULL;
}
#endif
@@ -85,7 +85,7 @@ ExprManager::ExprManager(const Options& options) :
d_ctxt(new Context),
d_nodeManager(new NodeManager(d_ctxt, options)) {
#ifdef CVC4_STATISTICS_ON
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
d_exprStatisticsVars[i] = NULL;
}
for (unsigned i = 0; i < kind::LAST_KIND; ++ i) {
@@ -104,7 +104,7 @@ ExprManager::~ExprManager() {
delete d_exprStatistics[i];
}
}
- for (unsigned i = 0; i < LAST_TYPE; ++ i) {
+ for (unsigned i = 0; i <= LAST_TYPE; ++ i) {
if (d_exprStatisticsVars[i] != NULL) {
StatisticsRegistry::unregisterStat(d_exprStatisticsVars[i]);
delete d_exprStatisticsVars[i];
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback