3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 18:00:23 +00:00

fix #1816 - m_parent_selects gets updated while accessing an interator, fix is to rely on the size of the vector for iteration

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-11-25 14:04:17 -08:00
parent aa723f1eee
commit 16be5b0e7d
3 changed files with 75 additions and 84 deletions

View file

@ -65,10 +65,14 @@ namespace smt {
bool result = false;
var_data * d = m_var_data[v];
var_data_full * d_full = m_var_data_full[v];
for (enode* pm : d_full->m_parent_maps)
for (enode* ps : d->m_parent_selects)
for (unsigned i = 0; i < d_full->m_parent_maps.size(); ++i) {
enode* pm = d_full->m_parent_maps[i];
for (unsigned j = 0; j < d->m_parent_selects.size(); ++j) {
enode* ps = d->m_parent_selects[j];
if (instantiate_select_map_axiom(ps, pm))
result = true;
result = true;
}
}
return result;
}