Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added decide-callback to user-propagator #5978

Merged
merged 9 commits into from
Apr 15, 2022
Merged

Added decide-callback to user-propagator #5978

merged 9 commits into from
Apr 15, 2022

Conversation

CEisenhofer
Copy link
Collaborator

Now just for the legacy solver

@CEisenhofer CEisenhofer marked this pull request as draft April 13, 2022 15:57
@CEisenhofer CEisenhofer marked this pull request as ready for review April 13, 2022 15:59
@NikolajBjorner NikolajBjorner merged commit e11496b into Z3Prover:master Apr 15, 2022
scoped_cb _cb(p, cb);
expr val(p->ctx(), _val);
p->m_decide_eh(val, bit, is_pos);
_val = val;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the expression val is declared locally. The reference count is invalid when thedecide_eh goes out of scope. The expression _val is passed to the solver.
If the reference count is not owned by the solver, this call will crash.
It can be expected the reference count isn't fully owned locally because the expression should be already registered. So the issue shouldn't manifest. OTOH, it is fragile and makes assumptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants