mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
bug fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f85c02600f
commit
79b2a4f605
3 changed files with 41 additions and 20 deletions
|
@ -58,9 +58,10 @@ static void throw_out_of_memory() {
|
|||
g_memory_out_of_memory = true;
|
||||
}
|
||||
|
||||
__assume(0);
|
||||
|
||||
if (g_exit_when_out_of_memory) {
|
||||
std::cerr << g_out_of_memory_msg << "\n";
|
||||
__assume(0);
|
||||
exit(ERR_MEMOUT);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -72,6 +72,7 @@ class vector {
|
|||
SZ new_capacity = (3 * old_capacity + 1) >> 1;
|
||||
SZ new_capacity_T = sizeof(T) * new_capacity + sizeof(SZ) * 2;
|
||||
if (new_capacity <= old_capacity || new_capacity_T <= old_capacity_T) {
|
||||
UNREACHABLE();
|
||||
throw default_exception("Overflow encountered when expanding vector");
|
||||
}
|
||||
SZ *mem = (SZ*)memory::reallocate(reinterpret_cast<SZ*>(m_data)-2, new_capacity_T);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue