3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-19 12:23:38 +00:00

fix mutexes hanging due to access to free'd memory

Thanks to Kevin de Vos for reporting the bug & testing the fix
This commit is contained in:
Nuno Lopes 2019-09-03 20:02:21 +01:00
parent cb75326686
commit 87a96d7bd4
8 changed files with 27 additions and 8 deletions

View file

@ -64,12 +64,13 @@ static internal_symbol_table* g_symbol_table = nullptr;
void initialize_symbols() {
if (!g_symbol_table) {
ALLOC_MUTEX(g_symbol_lock);
g_symbol_table = alloc(internal_symbol_table);
}
}
void finalize_symbols() {
delete g_symbol_lock;
DEALLOC_MUTEX(g_symbol_lock);
dealloc(g_symbol_table);
g_symbol_table = nullptr;
}