3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-08 23:23:23 +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

@ -575,11 +575,12 @@ void gparams::display_parameter(std::ostream & out, char const * name) {
void gparams::init() {
TRACE("gparams", tout << "gparams::init()\n";);
ALLOC_MUTEX(gparams_mux);
g_imp = alloc(imp);
}
void gparams::finalize() {
TRACE("gparams", tout << "gparams::finalize()\n";);
dealloc(g_imp);
delete gparams_mux;
DEALLOC_MUTEX(gparams_mux);
}