diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-02-04 18:11:40 -0500 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-02-04 18:11:40 -0500 |
commit | 17cf7ddc9613785a7bfb7d7957f1432a51dd137c (patch) | |
tree | 2f616fe021c4f67331fb0d910cf39e3a22b55cf6 /src/main/util.cpp | |
parent | aed7130284c04f7ada79db1ed3d4a8ddb08d3543 (diff) | |
parent | ef0e079d85b18fd36b4d90be15b465e2316a38c9 (diff) |
Merge branch '1.0.x'
Diffstat (limited to 'src/main/util.cpp')
-rw-r--r-- | src/main/util.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/util.cpp b/src/main/util.cpp index 9ade23630..a6fcddf3b 100644 --- a/src/main/util.cpp +++ b/src/main/util.cpp @@ -65,6 +65,7 @@ void* cvc4StackBase; void timeout_handler(int sig, siginfo_t* info, void*) { fprintf(stderr, "CVC4 interrupted by timeout.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -74,6 +75,7 @@ void timeout_handler(int sig, siginfo_t* info, void*) { void sigint_handler(int sig, siginfo_t* info, void*) { fprintf(stderr, "CVC4 interrupted by user.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -99,6 +101,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) { if(segvNoSpin) { fprintf(stderr, "No-spin requested, aborting...\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -119,6 +122,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) { cerr << "Looks like a NULL pointer was dereferenced." << endl; } if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -132,6 +136,7 @@ void ill_handler(int sig, siginfo_t* info, void*) { if(segvNoSpin) { fprintf(stderr, "No-spin requested, aborting...\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -145,6 +150,7 @@ void ill_handler(int sig, siginfo_t* info, void*) { #else /* CVC4_DEBUG */ fprintf(stderr, "CVC4 executed an illegal instruction.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } abort(); @@ -171,6 +177,7 @@ void cvc4unexpected() { if(segvNoSpin) { fprintf(stderr, "No-spin requested.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } set_terminate(default_terminator); @@ -184,6 +191,7 @@ void cvc4unexpected() { #else /* CVC4_DEBUG */ fprintf(stderr, "CVC4 threw an \"unexpected\" exception.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } set_terminate(default_terminator); @@ -197,6 +205,7 @@ void cvc4terminate() { "Perhaps an exception was thrown during stack unwinding. " "(Don't do that.)\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } default_terminator(); @@ -205,6 +214,7 @@ void cvc4terminate() { "CVC4 was terminated by the C++ runtime.\n" "Perhaps an exception was thrown during stack unwinding.\n"); if((*pOptions)[options::statistics] && pExecutor != NULL) { + pTotalTime->stop(); pExecutor->flushStatistics(cerr); } default_terminator(); |