From b8545842296c9419371b92ba0e790098d54c33cd Mon Sep 17 00:00:00 2001 From: weiyu Date: Wed, 11 Dec 2019 17:46:44 -0800 Subject: [PATCH] Fix segfault at the first lock action --- execution.cc | 3 +++ 1 file changed, 3 insertions(+) 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()) -- 2.34.1