From c64c91d84c76fede250cbe61946bd3666a8bce6c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 5 Dec 2019 15:26:23 +0100 Subject: [PATCH] Avoid division by zero. Problem seen on manjaro with mc-bugged1-liveness-ucontext and mc-bugged1-liveness-visited-ucontext. --- src/mc/compare.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.20.1