3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

set undo trail after set-watches to avoid crash during exception handling (the relevancy trail is scoped so ends up traversing the trail if allocating the watch throws an exception). Fixes crash.smt in issue #56

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-06-23 19:18:03 +02:00 committed by Christoph M. Wintersteiger
parent 03034e7b33
commit 1544105bd5
2 changed files with 7 additions and 1 deletions

View file

@ -69,6 +69,12 @@ static void throw_out_of_memory() {
}
static void throw_alloc_counts_exceeded() {
#pragma omp critical (z3_memory_manager)
{
// reset the count to avoid re-throwing while
// the exception is being thrown.
g_memory_alloc_count = 0;
}
throw exceeded_memory_allocations();
}