From fec6f01520b807167b31439b0e108df556c55219 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 13 Feb 2020 19:55:49 -0600 Subject: [PATCH] Allow uninitialized raw pointers. --- plugins/devel/check-structures-sanity.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/devel/check-structures-sanity.cpp b/plugins/devel/check-structures-sanity.cpp index 9bad36e23..da1915f35 100644 --- a/plugins/devel/check-structures-sanity.cpp +++ b/plugins/devel/check-structures-sanity.cpp @@ -228,7 +228,6 @@ bool Checker::check_access(const ToCheck & item, void *base, type_identity *iden } return false; #undef FAIL_PTR -#undef UNINIT_PTR } bool Checker::check_vtable(const ToCheck & item, void *vtable, type_identity *identity) @@ -388,6 +387,12 @@ void Checker::check_dispatch(const ToCheck & item) return; } + if (reinterpret_cast(item.ptr) == UNINIT_PTR) + { + // allow uninitialized raw pointers + return; + } + if (!check_access(item, item.ptr, item.identity) && item.identity->type() != IDTYPE_GLOBAL) { return;