mirror of
https://github.com/Z3Prover/z3
synced 2025-06-03 12:51:22 +00:00
fix crash during shutdown. Issue #719
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
310c0f31a1
commit
237fde1f76
1 changed files with 6 additions and 2 deletions
|
@ -78,7 +78,10 @@ void parameter::del_eh(ast_manager & m, family_id fid) {
|
||||||
}
|
}
|
||||||
else if (is_external()) {
|
else if (is_external()) {
|
||||||
SASSERT(fid != null_family_id);
|
SASSERT(fid != null_family_id);
|
||||||
m.get_plugin(fid)->del(*this);
|
decl_plugin * plugin = m.get_plugin(fid);
|
||||||
|
if (plugin) {
|
||||||
|
plugin->del(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,9 +1421,10 @@ ast_manager::~ast_manager() {
|
||||||
}
|
}
|
||||||
it = m_plugins.begin();
|
it = m_plugins.begin();
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
if (*it)
|
if (*it)
|
||||||
dealloc(*it);
|
dealloc(*it);
|
||||||
}
|
}
|
||||||
|
m_plugins.reset();
|
||||||
while (!m_ast_table.empty()) {
|
while (!m_ast_table.empty()) {
|
||||||
DEBUG_CODE(std::cout << "ast_manager LEAKED: " << m_ast_table.size() << std::endl;);
|
DEBUG_CODE(std::cout << "ast_manager LEAKED: " << m_ast_table.size() << std::endl;);
|
||||||
ptr_vector<ast> roots;
|
ptr_vector<ast> roots;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue