From: weiyu Date: Thu, 12 Dec 2019 01:46:44 +0000 (-0800) Subject: Fix segfault at the first lock action X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b8545842296c9419371b92ba0e790098d54c33cd;p=c11tester.git Fix segfault at the first lock action --- diff --git a/execution.cc b/execution.cc index 69b3b276..39abc039 100644 --- a/execution.cc +++ b/execution.cc @@ -1366,6 +1366,9 @@ ModelAction * ModelExecution::get_last_unlock(ModelAction *curr) const void *location = curr->get_location(); action_list_t *list = obj_map.get(location); + if (list == NULL) + return NULL; + /* Find: max({i in dom(S) | isUnlock(t_i) && samevar(t_i, t)}) */ sllnode* rit; for (rit = list->end();rit != NULL;rit=rit->getPrev())