3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

#6523 and other heap-use-after-free error

This commit is contained in:
Nikolaj Bjorner 2023-11-06 12:19:43 +01:00
parent eed02b6d86
commit e86eae27e6
2 changed files with 11 additions and 11 deletions

View file

@ -1042,7 +1042,10 @@ namespace arith {
SASSERT(m_nla);
SASSERT(m_nla->use_nra_model());
auto t = get_tv(v);
if (t.is_term()) {
if (!t.is_term()) {
m_nla->am().set(r, m_nla->am_value(t.id()));
}
else {
m_todo_terms.push_back(std::make_pair(t, rational::one()));
TRACE("nl_value", tout << "v" << v << " " << t.to_string() << "\n";);
TRACE("nl_value", tout << "v" << v << " := w" << t.to_string() << "\n";
@ -1072,11 +1075,8 @@ namespace arith {
}
}
}
return r;
}
else {
return m_nla->am_value(t.id());
}
return r;
}
lbool solver::make_feasible() {