From eb091f2a6d72fde22e896be3ba68f70b3317962a Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 25 Jul 2016 16:12:00 +0200 Subject: [PATCH] Fix problem detected by address sanitizer --- include/deal.II/base/aligned_vector.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index 7040bace72..cec47169f6 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -348,6 +348,9 @@ namespace internal virtual void apply_to_subrange (const std::size_t begin, const std::size_t end) const { + if (end == begin) + return; + // for classes trivial assignment can use memcpy. cast element to // (void*) to silence compiler warning for virtual classes (they will // never arrive here because they are non-trivial). -- 2.39.5