}
}
+#if 0
/** \brief Compute a hash for a given value of a given type
*
* We try to be very conservative (do not hash too ambiguous things).
mc_object_info_t info, const void *address,
dw_type_t type)
{
+ mc_process_t process = &mc_model_checker->process;
top:
switch (type->type) {
mc_address_add(state->handled_addresses, pointed);
// Anything outside the R/W segments and the heap is not hashed:
- bool valid_pointer = (pointed >= (void *) mc_binary_info->start_rw
- && pointed <= (void *) mc_binary_info->end_rw)
- || (pointed >= (void *) mc_libsimgrid_info->start_rw
- && pointed <= (void *) mc_libsimgrid_info->end_rw)
- || (pointed >= std_heap
- && pointed < (void *) ((const char *) std_heap + STD_HEAP_SIZE));
+ bool valid_pointer = (pointed >= (void *) binary_info->start_rw
+ && pointed <= (void *) binary_info->end_rw)
+ || (pointed >= (void *) libsimgrid_info->start_rw
+ && pointed <= (void *) libsimgrid_info->end_rw)
+ || (pointed >= process->heap_address
+ && pointed < (void *) ((const char *) process->heap_address + STD_HEAP_SIZE));
if (!valid_pointer) {
XBT_DEBUG("Hashed pointed data %p is in an ignored range", pointed);
return;
}
}
-
static void mc_hash_object_globals(mc_hash_t * hash, mc_hashing_state * state,
mc_object_info_t info)
{
}
const char *address = variable->address;
- bool valid_pointer = (address >= mc_binary_info->start_rw
- && address <= mc_binary_info->end_rw)
- || (address >= mc_libsimgrid_info->start_rw
- && address <= mc_libsimgrid_info->end_rw)
- || (address >= (const char *) std_heap
- && address < (const char *) std_heap + STD_HEAP_SIZE);
+ bool valid_pointer = (address >= binary_info->start_rw
+ && address <= binary_info->end_rw)
+ || (address >= libsimgrid_info->start_rw
+ && address <= libsimgrid_info->end_rw)
+ || (address >= (const char *) process->heap_address
+ && address < (const char *) process->heap_address + STD_HEAP_SIZE);
if (!valid_pointer)
continue;
MC_HASH(*hash, stack_frame->ip);
mc_object_info_t info;
- if (stack_frame->ip >= (unw_word_t) mc_libsimgrid_info->start_exec
- && stack_frame->ip < (unw_word_t) mc_libsimgrid_info->end_exec)
- info = mc_libsimgrid_info;
- else if (stack_frame->ip >= (unw_word_t) mc_binary_info->start_exec
- && stack_frame->ip < (unw_word_t) mc_binary_info->end_exec)
- info = mc_binary_info;
+ if (stack_frame->ip >= (unw_word_t) libsimgrid_info->start_exec
+ && stack_frame->ip < (unw_word_t) libsimgrid_info->end_exec)
+ info = libsimgrid_info;
+ else if (stack_frame->ip >= (unw_word_t) binary_info->start_exec
+ && stack_frame->ip < (unw_word_t) binary_info->end_exec)
+ info = binary_info;
else
continue;
++i;
}
}
+#endif
uint64_t mc_hash_processes_state(int num_state, xbt_dynar_t stacks)
{
mc_hash_t hash = MC_HASH_INIT;
MC_HASH(hash, xbt_swag_size(simix_global->process_list)); // process count
- mc_hash_object_globals(&hash, &state, mc_binary_info);
- // mc_hash_object_globals(&hash, &state, mc_libsimgrid_info);
- mc_hash_stacks(&hash, &state, stacks);
+ // mc_hash_object_globals(&hash, &state, binary_info);
+ // mc_hash_object_globals(&hash, &state, libsimgrid_info);
+ // mc_hash_stacks(&hash, &state, stacks);
mc_hash_state_destroy(&state);