3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-25 01:55:32 +00:00

add missing locks around mpz operations that access object allocator. Use internal skolem constant for theory assumption to hide it from models

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-05-14 14:04:00 -07:00
parent 0ddbd32a42
commit a0efdc21c3
3 changed files with 11 additions and 3 deletions

View file

@ -497,7 +497,9 @@ public:
STRACE("mpz", tout << "[mpz] 0 - " << to_string(a) << " == ";);
if (is_small(a) && a.m_val == INT_MIN) {
// neg(INT_MIN) is not a small int
MPZ_BEGIN_CRITICAL();
set_big_i64(a, - static_cast<long long>(INT_MIN));
MPZ_END_CRITICAL();
return;
}
#ifndef _MP_GMP
@ -518,7 +520,9 @@ public:
if (a.m_val < 0) {
if (a.m_val == INT_MIN) {
// abs(INT_MIN) is not a small int
MPZ_BEGIN_CRITICAL();
set_big_i64(a, - static_cast<long long>(INT_MIN));
MPZ_END_CRITICAL();
}
else
a.m_val = -a.m_val;