}
+static void MC_post_process_types(mc_object_info_t info) {
+ // Nothing here
+}
+
/** \brief Finds informations about a given shared object/executable */
mc_object_info_t MC_find_object_info(memory_map_t maps, char* name) {
mc_object_info_t result = MC_new_object_info();
result->file_name = xbt_strdup(name);
- result->start_data = NULL;
- result->start_text = NULL;
MC_find_object_address(maps, result);
MC_dwarf_get_variables(result);
+ MC_post_process_types(result);
return result;
}
// Nothing to do
}
else if ((reg.prot & PROT_WRITE)){
- result->start_data = reg.start_addr;
+ xbt_assert(!result->start_rw,
+ "Multiple read-write segments for %s, not supported",
+ maps->regions[i].pathname);
+ result->start_rw = reg.start_addr;
+ result->end_rw = reg.end_addr;
} else if ((reg.prot & PROT_READ) && (reg.prot & PROT_EXEC)){
- result->start_text = reg.start_addr;
+ xbt_assert(!result->start_exec,
+ "Multiple executable segments for %s, not supported",
+ maps->regions[i].pathname);
+ result->start_exec = reg.start_addr;
+ result->end_exec = reg.end_addr;
+ }
+ else if((reg.prot & PROT_READ) && !(reg.prot & PROT_EXEC)) {
+ xbt_assert(!result->start_ro,
+ "Multiple read only segments for %s, not supported",
+ maps->regions[i].pathname);
+ result->start_ro = reg.start_addr;
+ result->end_ro = reg.end_addr;
}
i++;
}
xbt_assert(result->file_name);
- xbt_assert(result->start_data);
- xbt_assert(result->start_text);
+ xbt_assert(result->start_rw);
+ xbt_assert(result->start_exec);
}
/************************************* Take Snapshot ************************************/
xbt_abort();
}
- unw_word_t ip, sp, off;
+ unw_word_t ip, off;
dw_frame_t frame;
unsigned int cursor = 0;
while(ret >= 0 && !stop){
unw_get_reg(&c, UNW_REG_IP, &ip);
- unw_get_reg(&c, UNW_REG_SP, &sp);
unw_get_proc_name(&c, frame_name, sizeof (frame_name), &off);
if(!strcmp(frame_name, "smx_ctx_sysv_wrapper")) /* Stop before context switch with maestro */
stop = 1;
- if((long)ip > (long) mc_libsimgrid_info->start_text)
+ if((long)ip > (long) mc_libsimgrid_info->start_exec)
frame = xbt_dict_get_or_null(mc_libsimgrid_info->local_variables, frame_name);
else
frame = xbt_dict_get_or_null(mc_binary_info->local_variables, frame_name);
xbt_dynar_foreach(frame->variables, cursor, current_variable){
- if((long)ip > (long)mc_libsimgrid_info->start_text)
+ if((long)ip > (long)mc_libsimgrid_info->start_exec)
region_type = 1;
else
region_type = 2;
new_var->type = strdup(current_variable->type_origin);
new_var->region= region_type;
- if(current_variable->address.location != NULL){
- new_var->address = (void*) MC_dwarf_resolve_location(&c, current_variable->address.location, frame_pointer_address);
+ /* if(current_variable->address!=NULL) {
+ new_var->address = current_variable->address;
+ } else */
+ if(current_variable->location != NULL){
+ new_var->address = (void*) MC_dwarf_resolve_location(&c, current_variable->location, frame_pointer_address);
}
xbt_dynar_push(variables, &new_var);
break;
case DW_TAG_typedef:
case DW_TAG_volatile_type:
+ case DW_TAG_const_type:
return compare_areas_with_type(area1, area2, types, other_types, type->dw_type_id, region_size, region_type, start_data, pointer_level);
break;
- case DW_TAG_const_type: /* Const variable cannot be modified */
- return -1;
- break;
case DW_TAG_array_type:
subtype = xbt_dict_get_or_null(types, type->dw_type_id);
switch(subtype->type){
}
elm_size = subtype->byte_size;
break;
+ case DW_TAG_const_type:
case DW_TAG_typedef:
case DW_TAG_volatile_type:
subsubtype = xbt_dict_get_or_null(types, subtype->dw_type_id);
pointer_level++;
- if(addr_pointed1 > std_heap && (char *)addr_pointed1 < (char*) std_heap + STD_HEAP_SIZE && addr_pointed2 > std_heap && (char *)addr_pointed2 < (char*) std_heap + STD_HEAP_SIZE){
+ // Some cases are not handled here:
+ // * the pointers lead to different areas (one to the heap, the other to the RW segment ...);
+ // * a pointer leads to the read-only segment of the current object;
+ // * a pointer lead to a different ELF object.
+
+ // The pointers are both in the heap:
+ if(addr_pointed1 > std_heap && (char *)addr_pointed1 < (char*) std_heap + STD_HEAP_SIZE){
+ if(!(addr_pointed2 > std_heap && (char *)addr_pointed2 < (char*) std_heap + STD_HEAP_SIZE))
+ return 1;
return compare_heap_area(addr_pointed1, addr_pointed2, NULL, types, other_types, type->dw_type_id, pointer_level);
- }else if(addr_pointed1 > start_data && (char*)addr_pointed1 <= (char *)start_data + region_size && addr_pointed2 > start_data && (char*)addr_pointed2 <= (char *)start_data + region_size){
+ }
+
+ // The pointers are both in the current object R/W segment:
+ else if(addr_pointed1 > start_data && (char*)addr_pointed1 <= (char *)start_data + region_size){
+ if(!(addr_pointed2 > start_data && (char*)addr_pointed2 <= (char *)start_data + region_size))
+ return 1;
if(type->dw_type_id == NULL)
return (addr_pointed1 != addr_pointed2);
else
return compare_areas_with_type(addr_pointed1, addr_pointed2, types, other_types, type->dw_type_id, region_size, region_type, start_data, pointer_level);
- }else{
+ }
+
+ else{
return (addr_pointed1 != addr_pointed2);
}
}
dw_variable_t current_var;
size_t offset;
void *start_data;
- void* start_data_binary = mc_binary_info->start_data;
- void* start_data_libsimgrid = mc_libsimgrid_info->start_data;
+ void* start_data_binary = mc_binary_info->start_rw;
+ void* start_data_libsimgrid = mc_libsimgrid_info->start_rw;
mc_object_info_t object_info = NULL;
mc_object_info_t other_object_info = NULL;
xbt_dynar_foreach(variables, cursor, current_var){
- if(region_type == 2)
- offset = (char *)current_var->address.address - (char *)start_data_binary;
- else
- offset = (char *)current_var->address.address - (char *)start_data_libsimgrid;
+ // If the variable is not in this object, skip it:
+ // We do not expect to find a pointer to something which is not reachable
+ // by the global variables.
+ if((char*) current_var->address < (char*) object_info->start_rw
+ || (char*) current_var->address > (char*) object_info->end_rw)
+ continue;
+
+ offset = (char *)current_var->address - (char *)object_info->start_rw;
res = compare_areas_with_type((char *)r1->data + offset, (char *)r2->data + offset, types, other_types, current_var->type_origin, r1->size, region_type, start_data, 0);
if(res == 1){
}
static int compare_local_variables(mc_snapshot_stack_t stack1, mc_snapshot_stack_t stack2, void *heap1, void *heap2){
- void* start_data_binary = mc_binary_info->start_data;
- void* start_data_libsimgrid = mc_libsimgrid_info->start_data;
+ void* start_data_binary = mc_binary_info->start_rw;
+ void* start_data_libsimgrid = mc_libsimgrid_info->start_rw;
if(!compared_pointers){
compared_pointers = xbt_dynar_new(sizeof(pointers_pair_t), pointers_pair_free_voidp);
cursor++;
}
- #ifdef MC_DEBUG
- if(is_diff == 0)
- xbt_os_walltimer_stop(timer);
- xbt_os_walltimer_start(timer);
- #endif
- /* Compare binary global variables */
- is_diff = compare_global_variables(2, s1->regions[2], s2->regions[2]);
- if(is_diff != 0){
- #ifdef MC_DEBUG
- xbt_os_walltimer_stop(timer);
- mc_comp_times->binary_global_variables_comparison_time = xbt_os_timer_elapsed(timer);
- XBT_DEBUG("(%d - %d) Different global variables in binary", num1, num2);
- errors++;
- #else
- #ifdef MC_VERBOSE
- XBT_VERB("(%d - %d) Different global variables in binary", num1, num2);
- #endif
- reset_heap_information();
- xbt_os_walltimer_stop(timer);
- xbt_os_timer_free(timer);
- xbt_os_walltimer_stop(global_timer);
- mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
- xbt_os_timer_free(global_timer);
+ const char* names[3] = { "?", "libsimgrid", "binary" };
+#ifdef MC_DEBUG
+ double *times[3] = {
+ NULL,
+ &mc_comp_times->libsimgrid_global_variables_comparison_time,
+ &mc_comp_times->binary_global_variables_comparison_time
+ };
+#endif
- return 1;
+ int k=0;
+ for(k=2; k!=0; --k) {
+ #ifdef MC_DEBUG
+ if(is_diff == 0)
+ xbt_os_walltimer_stop(timer);
+ xbt_os_walltimer_start(timer);
#endif
- }
- #ifdef MC_DEBUG
- if(is_diff == 0)
- xbt_os_walltimer_stop(timer);
- xbt_os_walltimer_start(timer);
- #endif
-
- /* Compare libsimgrid global variables */
- is_diff = compare_global_variables(1, s1->regions[1], s2->regions[1]);
+ /* Compare global variables */
+ is_diff = compare_global_variables(k, s1->regions[k], s2->regions[k]);
if(is_diff != 0){
#ifdef MC_DEBUG
xbt_os_walltimer_stop(timer);
- mc_comp_times->libsimgrid_global_variables_comparison_time = xbt_os_timer_elapsed(timer);
- XBT_DEBUG("(%d - %d) Different global variables in libsimgrid", num1, num2);
+ *times[k] = xbt_os_timer_elapsed(timer);
+ XBT_DEBUG("(%d - %d) Different global variables in %s", num1, num2, names[k]);
errors++;
#else
#ifdef MC_VERBOSE
- XBT_VERB("(%d - %d) Different global variables in libsimgrid", num1, num2);
+ XBT_VERB("(%d - %d) Different global variables in %s", num1, num2, names[k]);
#endif
-
+
reset_heap_information();
xbt_os_walltimer_stop(timer);
xbt_os_timer_free(timer);
return 1;
#endif
}
+ }
#ifdef MC_DEBUG
xbt_os_walltimer_start(timer);
recv_index = 0;
current_process++;
}
- XBT_DEBUG("Communication-deterministic : %d, Send-deterministic : %d", initial_state_safety->comm_deterministic, initial_state_safety->send_deterministic);
+ // XBT_DEBUG("Communication-deterministic : %d, Send-deterministic : %d", initial_state_safety->comm_deterministic, initial_state_safety->send_deterministic);
}
static int complete_comm_pattern(xbt_dynar_t list, mc_comm_pattern_t pattern){
unsigned int cursor = 0;
mc_comm_pattern_t current_comm;
xbt_dynar_foreach(comms_pattern, cursor, current_comm){
- fprintf(stderr, "%s (%d - comm %p, src : %lu, dst %lu, rdv name %s, data %p, matched with %d)\n", current_comm->type == SIMIX_COMM_SEND ? "iSend" : "iRecv", current_comm->num, current_comm->comm, current_comm->src_proc, current_comm->dst_proc, current_comm->rdv, current_comm->data, current_comm->matched_comm);
+ // fprintf(stderr, "%s (%d - comm %p, src : %lu, dst %lu, rdv name %s, data %p, matched with %d)\n", current_comm->type == SIMIX_COMM_SEND ? "iSend" : "iRecv", current_comm->num, current_comm->comm, current_comm->src_proc, current_comm->dst_proc, current_comm->rdv, current_comm->data, current_comm->matched_comm);
}
}
}
}
+#define MC_DW_CLASS_UNKNOWN 0
+#define MC_DW_CLASS_ADDRESS 1 // Location in the address space of the program
+#define MC_DW_CLASS_BLOCK 2 // Arbitrary block of bytes
+#define MC_DW_CLASS_CONSTANT 3
+#define MC_DW_CLASS_STRING 3 // String
+#define MC_DW_CLASS_FLAG 4 // Boolean
+#define MC_DW_CLASS_REFERENCE 5 // Reference to another DIE
+#define MC_DW_CLASS_EXPRLOC 6 // DWARF expression/location description
+#define MC_DW_CLASS_LINEPTR 7
+#define MC_DW_CLASS_LOCLISTPTR 8
+#define MC_DW_CLASS_MACPTR 9
+#define MC_DW_CLASS_RANGELISTPTR 10
+
+static int MC_dwarf_form_get_class(int form) {
+ switch(form) {
+ case DW_FORM_addr:
+ return MC_DW_CLASS_ADDRESS;
+ case DW_FORM_block2:
+ case DW_FORM_block4:
+ case DW_FORM_block:
+ case DW_FORM_block1:
+ return MC_DW_CLASS_BLOCK;
+ case DW_FORM_data2:
+ case DW_FORM_data4:
+ case DW_FORM_data8:
+ case DW_FORM_udata:
+ case DW_FORM_sdata:
+ return MC_DW_CLASS_CONSTANT;
+ case DW_FORM_string:
+ case DW_FORM_strp:
+ return MC_DW_CLASS_STRING;
+ case DW_FORM_ref_addr:
+ case DW_FORM_ref1:
+ case DW_FORM_ref2:
+ case DW_FORM_ref4:
+ case DW_FORM_ref8:
+ case DW_FORM_ref_udata:
+ return MC_DW_CLASS_REFERENCE;
+ case DW_FORM_flag:
+ case DW_FORM_flag_present:
+ return MC_DW_CLASS_FLAG;
+ case DW_FORM_exprloc:
+ return MC_DW_CLASS_EXPRLOC;
+ // TODO sec offset
+ // TODO indirect
+ default:
+ return MC_DW_CLASS_UNKNOWN;
+ }
+}
+
/** \brief Get the name of the tag of a given DIE
*
* \param die DIE
return MC_dwarf_attr_uint(die, DW_AT_count, 0);
}
- // Otherwise compute DW_TAG_upper_bound-DW_TAG_lower_bound:
+ // Otherwise compute DW_TAG_upper_bound-DW_TAG_lower_bound + 1:
if (!dwarf_hasattr_integrate(die, DW_AT_upper_bound)) {
// This is not really 0, but the code expects this (we do not know):
} else {
lower_bound = MC_dwarf_default_lower_bound(dwarf_srclang(unit));
}
- return upper_bound - lower_bound;
+ return upper_bound - lower_bound + 1;
}
static uint64_t MC_dwarf_array_element_count(Dwarf_Die* die, Dwarf_Die* unit) {
Dwarf_Attribute attr;
dwarf_attr_integrate(child, DW_AT_data_member_location, &attr);
- switch (dwarf_whatform(&attr)) {
-
- case DW_FORM_exprloc:
+ int klass = MC_dwarf_form_get_class(dwarf_whatform(&attr));
+ switch (klass) {
+ case MC_DW_CLASS_EXPRLOC:
+ case MC_DW_CLASS_BLOCK:
+ // Location expression:
{
Dwarf_Op* expr;
size_t len;
if (len==1 && expr[0].atom == DW_OP_plus_uconst) {
member->offset = expr[0].number;
} else {
- xbt_die("Can't groke this location expression yet. %i %i",
- len==1 , expr[0].atom == DW_OP_plus_uconst);
+ xbt_die("Can't groke this location expression yet.");
}
break;
}
- case DW_FORM_data1:
- case DW_FORM_data2:
- case DW_FORM_data4:
- case DW_FORM_data8:
- case DW_FORM_sdata:
- case DW_FORM_udata:
+ case MC_DW_CLASS_CONSTANT:
+ // Offset from the base address of the object:
{
Dwarf_Word offset;
if (!dwarf_formudata(&attr, &offset))
member->offset = offset;
else
- xbt_die("Cannot get DW_AT_data_member_%s location <%p>%s",
+ xbt_die("Cannot get %s location <%p>%s",
MC_dwarf_attr_string(child, DW_AT_name),
type->id, type->name);
break;
}
+ case MC_DW_CLASS_LOCLISTPTR:
+ // Reference to a location list:
+ // TODO
+ case MC_DW_CLASS_REFERENCE:
+ // It's supposed to be possible in DWARF2 but I couldn't find its semantic
+ // in the spec.
+ default:
+ xbt_die("Can't handle form class 0x%x (%i) as DW_AT_member_location", klass, klass);
}
+
}
static void MC_dwarf_add_members(mc_object_info_t info, Dwarf_Die* die, Dwarf_Die* unit, dw_type_t type) {
return loc;
}
+static int mc_anonymous_variable_index = 0;
+
static dw_variable_t MC_die_to_variable(mc_object_info_t info, Dwarf_Die* die, Dwarf_Die* unit, dw_frame_t frame) {
// Drop declaration:
if (MC_dwarf_attr_flag(die, DW_AT_declaration, false))
variable->global = frame == NULL; // Can be override base on DW_AT_location
variable->name = xbt_strdup(MC_dwarf_attr_string(die, DW_AT_name));
variable->type_origin = MC_dwarf_at_type(die);
- variable->address.address = NULL;
- int form;
- switch (form = dwarf_whatform(&attr_location)) {
- case DW_FORM_exprloc:
- case DW_FORM_block1: // Not in the spec but found in the wild.
+ int klass = MC_dwarf_form_get_class(dwarf_whatform(&attr_location));
+ switch (klass) {
+ case MC_DW_CLASS_EXPRLOC:
+ case MC_DW_CLASS_BLOCK:
+ // Location expression:
{
Dwarf_Op* expr;
size_t len;
variable->global = 1;
Dwarf_Off offset = expr[0].number;
// TODO, Why is this different base on the object?
- Dwarf_Off base = strcmp(info->file_name, xbt_binary_name) !=0 ? (Dwarf_Off) info->start_text : 0;
- variable->address.address = (void*) (base + offset);
+ Dwarf_Off base = strcmp(info->file_name, xbt_binary_name) !=0 ? (Dwarf_Off) info->start_exec : 0;
+ variable->address = (void*) (base + offset);
} else {
- variable->address.location = MC_dwarf_get_expression(expr, len);
+ variable->location = MC_dwarf_get_expression(expr, len);
}
break;
}
- case DW_FORM_sec_offset: // type loclistptr
- case DW_FORM_data2:
- case DW_FORM_data4:
- case DW_FORM_data8:
- variable->address.location = MC_dwarf_get_location_list(die, &attr_location);
+ case MC_DW_CLASS_LOCLISTPTR:
+ case MC_DW_CLASS_CONSTANT:
+ // Reference to location list:
+ variable->location = MC_dwarf_get_location_list(die, &attr_location);
break;
default:
- xbt_die("Unexpected form %i list for location in <%p>%s",
- form, (void*) variable->dwarf_offset, variable->name);
+ xbt_die("Unexpected calss 0x%x (%i) list for location in <%p>%s",
+ klass, klass, (void*) variable->dwarf_offset, variable->name);
+ }
+
+ // The current code needs a variable name,
+ // generate a fake one:
+ if(!variable->name) {
+ variable->name = bprintf("@anonymous#%i", mc_anonymous_variable_index++);
}
return variable;
#include "xbt/automaton.h"
#include "xbt/dict.h"
-static void MC_post_process_types(mc_object_info_t info);
-
XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc,
"Logging specific to MC (global)");
xbt_free(v->name);
xbt_free(v->type_origin);
if(!v->global)
- dw_location_free(v->address.location);
+ dw_location_free(v->location);
xbt_free(v);
}
}
// object_info
mc_object_info_t MC_new_object_info(void) {
- mc_object_info_t res = xbt_new(s_mc_object_info_t, 1);
- res->file_name = NULL;
- res->start_text = NULL;
- res->start_data = NULL;
- res->start_bss = NULL;
+ mc_object_info_t res = xbt_new0(s_mc_object_info_t, 1);
res->local_variables = xbt_dict_new_homogeneous(NULL);
res->global_variables = xbt_dynar_new(sizeof(dw_variable_t), dw_variable_free_voidp);
res->types = xbt_dict_new_homogeneous(NULL);
end = cursor - 1;
}else{
if(address){ /* global variable */
- if(var_test->address.address == address)
+ if(var_test->address == address)
return -1;
- if(var_test->address.address > address)
+ if(var_test->address > address)
end = cursor - 1;
else
start = cursor + 1;
}
if(strcmp(var_test->name, var) == 0){
- if(address && var_test->address.address < address)
+ if(address && var_test->address < address)
return cursor+1;
else
return cursor;
}
void MC_dwarf_register_global_variable(mc_object_info_t info, dw_variable_t variable) {
- int index = MC_dwarf_get_variable_index(info->global_variables, variable->name, variable->address.address);
+ int index = MC_dwarf_get_variable_index(info->global_variables, variable->name, variable->address);
if (index != -1)
xbt_dynar_insert_at(info->global_variables, index, &variable);
// TODO, else ?
MC_dwarf_register_non_global_variable(info, frame, variable);
}
-static void MC_post_process_array_size(mc_object_info_t info, dw_type_t type) {
- xbt_assert(type->dw_type_id, "No base type for array <%p>%s", type->id, type->name);
- dw_type_t subtype = xbt_dict_get_or_null(info->types, type->dw_type_id);
- xbt_assert(subtype, "Unkown base type <%s> for array <%p>%s", type->dw_type_id, type->id, type->name);
- if(subtype->type==DW_TAG_array_type && type->byte_size==0) {
- MC_post_process_array_size(info, subtype);
- }
- type->byte_size = type->element_count*subtype->byte_size;
-}
-
-static void MC_post_process_types(mc_object_info_t info) {
- xbt_dict_cursor_t cursor;
- char *origin;
- dw_type_t type;
- xbt_dict_foreach(info->types, cursor, origin, type){
- if(type->type==DW_TAG_array_type && type->byte_size==0)
- MC_post_process_array_size(info, type);
- }
-}
-
/******************************* Ignore mechanism *******************************/
/*********************************************************************************/
typedef struct s_mc_object_info {
char* file_name;
- char* start_text;
- char* start_data;
- char* start_bss;
+ char *start_exec, *end_exec; // Executable segment
+ char *start_rw, *end_rw; // Read-write segment
+ char *start_ro, *end_ro; // read-only segment
xbt_dict_t local_variables; // xbt_dict_t<frame_name, dw_frame_t>
xbt_dynar_t global_variables; // xbt_dynar_t<dw_variable_t>
xbt_dict_t types; // xbt_dict_t<origin as hexadecimal string, dw_type_t>
int global;
char *name;
char *type_origin;
- union{
- dw_location_t location; // For global==0
- void *address; // For global!=0
- }address;
+
+ // Use either of:
+ dw_location_t location;
+ void* address;
+
}s_dw_variable_t, *dw_variable_t;
typedef struct s_dw_frame{
int i = 0;
void *addr_pointed1, *addr_pointed2;
- int pointer_align, ignore1, ignore2, res_compare;
+ int pointer_align, res_compare;
+ ssize_t ignore1, ignore2;
while(i<size){
if(is_stack(real_area1) && is_stack(real_area2))
return 0;
- size_t ignore1, ignore2;
+ ssize_t ignore1, ignore2;
if((check_ignore > 0) && ((ignore1 = heap_comparison_ignore_size(to_ignore1, real_area1)) > 0) && ((ignore2 = heap_comparison_ignore_size(to_ignore2, real_area2)) == ignore1)){
return 0;
switch(type->type){
case DW_TAG_base_type:
- if(strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */
+ if(type->name!=NULL && strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */
if(real_area1 == real_area2)
return -1;
else
return (memcmp(area1, area2, type->byte_size) != 0);
break;
case DW_TAG_typedef:
- return compare_heap_area_with_type(real_area1, real_area2, area1, area2, previous, all_types, other_types, type->dw_type_id, area_size, check_ignore, pointer_level);
- break;
case DW_TAG_const_type:
- return 0;
+ case DW_TAG_volatile_type:
+ return compare_heap_area_with_type(real_area1, real_area2, area1, area2, previous, all_types, other_types, type->dw_type_id, area_size, check_ignore, pointer_level);
break;
case DW_TAG_array_type:
subtype = xbt_dict_get_or_null(all_types, type->dw_type_id);
elm_size = subtype->byte_size;
break;
// TODO, just remove the type indirection?
+ case DW_TAG_const_type:
case DW_TAG_typedef:
case DW_TAG_volatile_type:
subsubtype = xbt_dict_get_or_null(all_types, subtype->dw_type_id);
case DW_TAG_union_type:
return compare_heap_area_without_type(real_area1, real_area2, area1, area2, previous, all_types, other_types, type->byte_size, check_ignore);
break;
- case DW_TAG_volatile_type:
- return compare_heap_area_with_type(real_area1, real_area2, area1, area2, previous, all_types, other_types, type->dw_type_id, area_size, check_ignore, pointer_level);
- break;
default:
break;
}
type = xbt_dict_get_or_null(all_types, type->dw_type_id);
}
}
- if((type->byte_size == DW_TAG_pointer_type) || ((type->type == DW_TAG_base_type) && (!strcmp(type->name, "char"))))
+ if((type->byte_size == DW_TAG_pointer_type) || ((type->type == DW_TAG_base_type) && type->name!=NULL && (!strcmp(type->name, "char"))))
type_size = -1;
else
type_size = type->byte_size;
}
if(type_size != -1){
- if(type_size != heapinfo1[block1].busy_block.busy_size && type_size != heapinfo2[block2].busy_block.busy_size && !strcmp(type->name, "s_smx_context")){
+ if(type_size != heapinfo1[block1].busy_block.busy_size && type_size != heapinfo2[block2].busy_block.busy_size && type->name!=NULL && !strcmp(type->name, "s_smx_context")){
if(match_pairs){
match_equals(previous);
xbt_dynar_free(&previous);