From 1939afadc8cb4e240e487006a547b4cb86a9509e Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Thu, 26 Feb 2015 10:15:19 +0100 Subject: [PATCH 1/1] model-checker : mutex owner may be NULL after UNLOCK --- src/mc/mc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mc/mc_request.c b/src/mc/mc_request.c index 5b309a3855..3d7638c581 100644 --- a/src/mc/mc_request.c +++ b/src/mc/mc_request.c @@ -338,7 +338,7 @@ char *MC_request_to_string(smx_simcall_t req, int value) case SIMCALL_MUTEX_UNLOCK: type = xbt_strdup("Mutex UNLOCK"); mutex = simcall_mutex_unlock__get__mutex(req); - args = bprintf("locked = %d, owner = %lu, sleeping = %d", mutex->locked, mutex->owner->pid, xbt_swag_size(mutex->sleeping)); + args = bprintf("locked = %d, owner = %d, sleeping = %d", mutex->locked, mutex->owner != NULL ? (int)mutex->owner->pid : -1, xbt_swag_size(mutex->sleeping)); break; case SIMCALL_MC_SNAPSHOT: -- 2.20.1