Skip to content

core: do not serialize Time::Min() and Time::Max() values

Gabriel Ferreira requested to merge Gabrielcarvfer/ns-3-dev:UBSAN_CORE into master

Spin-off of !1582 (merged). The proposed fix simply handles the case of Time::Min() and Time::Max() being serialized (e.g. to log/assert messages).

The undefined behavior is due to Time::Min() silently underflowing during the scaling to print with Time().As().

Update: Added a few control points to detect Time overflows/underflows to log then abort the simulation. And fixed a mesh bug discovered with the checks.

Edited by Gabriel Ferreira

Merge request reports