fix Z3 logging functionality so the log isn't closed too early
MODIFY
smt/ctx.cpp
smt/ctx.cpp
@@ -48,8 +48,19 @@ void context::init() {
void context::destroy() {
Z3_params_dec_ref(ctx, no_timeout_param);
- Z3_close_log();
Z3_del_context(ctx);
}
}
+
+
+// close log file on program exit
+namespace {
+struct close_log {
+ ~close_log() {
+ Z3_close_log();
+ }
+};
+
+close_log close;
+}

fix Z3 logging functionality so the log isn't closed too early