Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid division by zero.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Dec 2019 14:26:23 +0000 (15:26 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Dec 2019 15:08:27 +0000 (16:08 +0100)
Problem seen on manjaro with mc-bugged1-liveness-ucontext and mc-bugged1-liveness-visited-ucontext.

src/mc/compare.cpp

index f5c1a62..ca257f8 100644 (file)
@@ -660,6 +660,8 @@ static bool heap_area_differ_with_type(simgrid::mc::StateComparator& state, cons
     case DW_TAG_class_type:
       if (type->full_type)
         type = type->full_type;
+      if (type->byte_size == 0)
+        return false;
       if (area_size != -1 && type->byte_size != area_size) {
         if (area_size <= type->byte_size || area_size % type->byte_size != 0)
           return false;