From: Arnaud Giersch Date: Thu, 5 Dec 2019 14:26:23 +0000 (+0100) Subject: Avoid division by zero. X-Git-Tag: v3.25~335^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c64c91d84c76fede250cbe61946bd3666a8bce6c Avoid division by zero. Problem seen on manjaro with mc-bugged1-liveness-ucontext and mc-bugged1-liveness-visited-ucontext. --- diff --git a/src/mc/compare.cpp b/src/mc/compare.cpp index f5c1a62c74..ca257f84d6 100644 --- a/src/mc/compare.cpp +++ b/src/mc/compare.cpp @@ -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;