3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00

fix regression in top-sort fix #6060

This commit is contained in:
Nikolaj Bjorner 2022-06-14 09:49:25 -07:00
parent 637120ced5
commit 55421afd61

View file

@ -87,8 +87,10 @@ class top_sort {
public:
virtual ~top_sort() {
for (auto * t : m_dep_keys)
for (auto * t : m_dep_keys) {
dealloc(get_dep(t));
m_deps[t->get_small_id()] = nullptr;
}
}
void topological_sort() {
@ -103,8 +105,11 @@ public:
}
void insert(T* t, T_set* s) {
m_deps.setx(t->get_small_id(), add_tag(s), nullptr);
if (contains_dep(t))
dealloc(get_dep(t));
else
m_dep_keys.push_back(t);
m_deps.setx(t->get_small_id(), add_tag(s), nullptr);
}
ptr_vector<T> const& deps() { return m_dep_keys; }