From 195b933c6141f2c7b2f257fc4f36556f6044a4b1 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Tue, 11 Feb 2020 17:17:11 -0600 Subject: [PATCH] ignore contents of elements of "bad" pointer vectors --- plugins/devel/check-structures-sanity.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/devel/check-structures-sanity.cpp b/plugins/devel/check-structures-sanity.cpp index 942a384db..207f452f1 100644 --- a/plugins/devel/check-structures-sanity.cpp +++ b/plugins/devel/check-structures-sanity.cpp @@ -676,6 +676,12 @@ void Checker::check_vector(const ToCheck & item, type_identity *item_identity, b FAIL("vector capacity is non-integer (" << (ucapacity / item_size) << " items plus " << (ucapacity % item_size) << " bytes)"); } + if (item.path.back() == ".bad" && pointer) + { + // check pointers but don't check contents + item_identity = nullptr; + } + if (local_ok && check_access(item, reinterpret_cast(vector.start), item.identity, length) && item_identity) { auto ienum = static_cast(static_cast(item.identity)->getIndexEnumType());