3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-21 05:13:39 +00:00

pass algebraic manager to arith-plugin mk-numeral because rational check may overwrite the argument using the current manager deals with crash as part of #4532

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-07-26 17:52:28 -07:00
parent ac39ddb43f
commit c7704ef9af
11 changed files with 43 additions and 45 deletions

View file

@ -106,6 +106,7 @@ public:
std::swap(m_ptr, other.m_ptr);
}
mpz& operator=(mpz const& other) = delete;
mpz& operator=(mpz &&other) {
swap(other);
return *this;
@ -535,13 +536,6 @@ public:
}
}
void set(mpz & target, mpz && source) {
target.m_val = source.m_val;
std::swap(target.m_ptr, source.m_ptr);
auto o = target.m_owner; target.m_owner = source.m_owner; source.m_owner = o;
auto k = target.m_kind; target.m_kind = source.m_kind; source.m_kind = k;
}
void set(mpz & a, int val) {
a.m_val = val;
a.m_kind = mpz_small;
@ -724,6 +718,7 @@ public:
// Store the digits of n into digits, and return the sign.
bool decompose(mpz const & n, svector<digit_t> & digits);
};
#ifndef SINGLE_THREAD