mirror of
https://github.com/Z3Prover/z3
synced 2026-03-16 02:00:00 +00:00
Fix null pointer dereferences and uninitialized variables from discussion #8891
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
9dcd01c52b
commit
391febed3b
5 changed files with 14 additions and 6 deletions
|
|
@ -1402,6 +1402,7 @@ namespace euf {
|
|||
// to check it again.
|
||||
get_check_mark(reg) == NOT_CHECKED &&
|
||||
is_ground(m_registers[reg]) &&
|
||||
instr->m_enode != nullptr &&
|
||||
get_pat_lbl_hash(reg) == instr->m_enode->get_lbl_hash();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -289,23 +289,23 @@ namespace sls {
|
|||
b = g.find(to_app(e)->get_arg(1));
|
||||
}
|
||||
if (lit.sign() && m.is_eq(e)) {
|
||||
if (a->get_root() == b->get_root()) {
|
||||
if (a && b && a->get_root() == b->get_root()) {
|
||||
IF_VERBOSE(0, verbose_stream() << "not disequal " << lit << " " << mk_pp(e, m) << "\n");
|
||||
ctx.display(verbose_stream());
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
else if (!lit.sign() && m.is_eq(e)) {
|
||||
if (a->get_root() != b->get_root()) {
|
||||
if (a && b && a->get_root() != b->get_root()) {
|
||||
IF_VERBOSE(0, verbose_stream() << "not equal " << lit << " " << mk_pp(e, m) << "\n");
|
||||
//UNREACHABLE();
|
||||
}
|
||||
}
|
||||
else if (to_app(e)->get_family_id() != basic_family_id && lit.sign() && g.find(e)->get_root() != g.find(m.mk_false())->get_root()) {
|
||||
else if (to_app(e)->get_family_id() != basic_family_id && lit.sign() && g.find(e) && g.find(m.mk_false()) && g.find(e)->get_root() != g.find(m.mk_false())->get_root()) {
|
||||
IF_VERBOSE(0, verbose_stream() << "not alse " << lit << " " << mk_pp(e, m) << "\n");
|
||||
//UNREACHABLE();
|
||||
}
|
||||
else if (to_app(e)->get_family_id() != basic_family_id && !lit.sign() && g.find(e)->get_root() != g.find(m.mk_true())->get_root()) {
|
||||
else if (to_app(e)->get_family_id() != basic_family_id && !lit.sign() && g.find(e) && g.find(m.mk_true()) && g.find(e)->get_root() != g.find(m.mk_true())->get_root()) {
|
||||
IF_VERBOSE(0, verbose_stream() << "not true " << lit << " " << mk_pp(e, m) << "\n");
|
||||
//UNREACHABLE();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue