Skip to content

Fix missing push() before pop() in SaberCondAllocator::isSatisfiable#1816

Open
Patrickstarrrrr wants to merge 1 commit intoSVF-tools:masterfrom
Patrickstarrrrr:fix-svf-bug
Open

Fix missing push() before pop() in SaberCondAllocator::isSatisfiable#1816
Patrickstarrrrr wants to merge 1 commit intoSVF-tools:masterfrom
Patrickstarrrrr:fix-svf-bug

Conversation

@Patrickstarrrrr
Copy link
Copy Markdown

Bug Description

SaberCondAllocator::isSatisfiable() calls solver.pop() without a matching solver.push(). This causes a Z3 "index out of bounds" exception when the solver's scope stack is empty. Additionally, the added constraint is never popped, permanently polluting the solver state.

Fix

Add the missing push() before add(), consistent with the adjacent isEquivalentBranchCond() and the usage pattern in Z3Expr.cpp.

The isSatisfiable function calls solver.pop() without a matching push(),
which causes a Z3 'index out of bounds' exception when the solver's
scope stack is empty. This also pollutes the solver state because the
added constraint is never popped.

Add the missing push() to match the existing pop(), consistent with the
adjacent isEquivalentBranchCond() and Z3Expr.cpp usage patterns.
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.

1 participant