From: Marion Guthmuller Date: Mon, 28 Jan 2013 09:19:52 +0000 (+0100) Subject: model-checker : reset args and result of simcalls in simcall_BODY macro X-Git-Tag: v3_9_rc1~54 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4bd100c60f5ce9eb90336facb97e09e1db932ca4 model-checker : reset args and result of simcalls in simcall_BODY macro --- diff --git a/src/mc/mc_compare.c b/src/mc/mc_compare.c index 711fd83980..873205dc7d 100644 --- a/src/mc/mc_compare.c +++ b/src/mc/mc_compare.c @@ -640,6 +640,7 @@ static int compare_stack(stack_region_t s1, stack_region_t s2, void *sp1, void * int MC_compare_snapshots(void *s1, void *s2){ MC_ignore_stack("self", "simcall_BODY_mc_snapshot"); + MC_ignore_stack("i", "simcall_BODY_mc_snapshot"); return simcall_mc_compare_snapshots(s1, s2); diff --git a/src/simix/smx_smurf_private.h b/src/simix/smx_smurf_private.h index 82a65ca22c..9cc5b12e8a 100644 --- a/src/simix/smx_smurf_private.h +++ b/src/simix/smx_smurf_private.h @@ -172,6 +172,11 @@ inline static SIMCALL_FUNC_RETURN_TYPE(RES) simcall_BODY_##NAME(MAP(SIMCALL_ARG, ##__VA_ARGS__)) { \ smx_process_t self = SIMIX_process_self(); \ self->simcall.call = TYPE; \ + int i; \ + for(i=0; i< 10; i++){ \ + memset(&(self->simcall.args[i]), 0, sizeof(&(self->simcall.args[i]))); \ + } \ + memset(&(self->simcall.result), 0, sizeof(&(self->simcall.result))); \ MAP_WITH_DEFAULT_ARGS(SIMCALL_INIT_FIELD, (), ##__VA_ARGS__) \ if (self != simix_global->maestro_process) { \ XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, \