Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : reset args and result of simcalls in simcall_BODY macro
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 28 Jan 2013 09:19:52 +0000 (10:19 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 28 Jan 2013 09:20:35 +0000 (10:20 +0100)
src/mc/mc_compare.c
src/simix/smx_smurf_private.h

index 711fd83..873205d 100644 (file)
@@ -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);
 
index 82a65ca..9cc5b12 100644 (file)
   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, \