Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix bad parameter passed in mc_diff
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 4 Jul 2014 11:22:00 +0000 (13:22 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 8 Jul 2014 10:32:36 +0000 (12:32 +0200)
commita230139c77ab68cc58ffbb2f27d3a4f46deebb04
tree3b427b565344df5adda36641298b305ae3c51a46
parent6f07730cd8f92bc3086abf143076947a71adb330
[mc] Fix bad parameter passed in mc_diff

In the following calls:

    compare_heap_area_with_type(state,
      area1, area2,
      area1_to_compare, area2_to_compare,
      snapshot1, snapshot2,
      previous, type, size, check_ignore,
      pointer_level);

    compare_heap_area_without_type(state,
      area1, area2,
      area1_to_compare, area2_to_compare,
      snapshot1, snapshot2,
      previous, size, check_ignore);

areaX and real_areaX_to_compare do not point the same data in different
address spaces in some cases.

Sometimes real_areaX_to_compare is adjusted to point to the beginning
of the block or fragment:

    area1_to_compare = addr_block1;
    // or
    area1_to_compare = (char *) addr_frag1 + offset1;
      // (when offset1==0)

but areaX is not adjusted accordingly and still point to the original
data: in the called compare_heap_area_with[out]_type(), the two values
are inconsistent.

Moreover in some cases, the type does not correspond:

  * areaX_to_compareX is the beginning of the fragment ;
  * type is the type of areaX,  not the type of the fragment.
src/mc/mc_diff.c