From: weiyu Date: Mon, 15 Jul 2019 20:28:39 +0000 (-0700) Subject: ignore futex notify if no successful futex wait was performed in the same location... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=db3061f5f48214c07781c4339d615f62b08ccf9e;p=c11tester.git ignore futex notify if no successful futex wait was performed in the same location in the first place --- diff --git a/futex.cc b/futex.cc index 0647337b..11685d38 100644 --- a/futex.cc +++ b/futex.cc @@ -61,6 +61,10 @@ namespace std _GLIBCXX_VISIBILITY(default) // INT_MAX wakes all the waiters at the address __addr ModelExecution *execution = model->get_execution(); cdsc::condition_variable *v = execution->getCondMap()->get( (pthread_cond_t *) __addr); + + if (v == NULL) + return; // do nothing + v->notify_all(); }