mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 02:10:23 +00:00
fix #1276 related crashes for re-sumption after cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
bec60f763b
commit
05428314be
5 changed files with 31 additions and 11 deletions
|
@ -21,6 +21,7 @@ Revision History:
|
|||
|
||||
reslimit::reslimit():
|
||||
m_cancel(0),
|
||||
m_suspend(false),
|
||||
m_count(0),
|
||||
m_limit(0) {
|
||||
}
|
||||
|
@ -31,12 +32,12 @@ uint64 reslimit::count() const {
|
|||
|
||||
bool reslimit::inc() {
|
||||
++m_count;
|
||||
return m_cancel == 0 && (m_limit == 0 || m_count <= m_limit);
|
||||
return (m_cancel == 0 && (m_limit == 0 || m_count <= m_limit)) || m_suspend;
|
||||
}
|
||||
|
||||
bool reslimit::inc(unsigned offset) {
|
||||
m_count += offset;
|
||||
return m_cancel == 0 && (m_limit == 0 || m_count <= m_limit);
|
||||
return (m_cancel == 0 && (m_limit == 0 || m_count <= m_limit)) || m_suspend;
|
||||
}
|
||||
|
||||
void reslimit::push(unsigned delta_limit) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue