From: weiyu Date: Mon, 6 Jan 2020 21:00:01 +0000 (-0800) Subject: Bug fix for removing ATOMIC_WAIT actions X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=8690d27f56658be9800f5dd2232f73fbe0381c1d Bug fix for removing ATOMIC_WAIT actions --- diff --git a/execution.cc b/execution.cc index 05591751..baa59171 100644 --- a/execution.cc +++ b/execution.cc @@ -1671,9 +1671,17 @@ void ModelExecution::removeAction(ModelAction *act) { } { sllnode * listref = act->getThrdMapRef(); - if (listref != NULL) { - SnapVector *vec = get_safe_ptr_vect_action(&obj_thrd_map, act->get_location()); - (*vec)[act->get_tid()].erase(listref); + if (act->is_wait()) { + if (listref != NULL) { + void *mutex_loc = (void *) act->get_value(); + SnapVector *vec = get_safe_ptr_vect_action(&obj_thrd_map, mutex_loc); + (*vec)[act->get_tid()].erase(listref); + } + } else { + if (listref != NULL) { + SnapVector *vec = get_safe_ptr_vect_action(&obj_thrd_map, act->get_location()); + (*vec)[act->get_tid()].erase(listref); + } } } if ((act->is_fence() && act->is_seqcst()) || act->is_unlock()) {