Allow uninitialized raw pointers.

develop
Ben Lubar 2020-02-13 19:55:49 -06:00
parent 4e6e01c09f
commit fec6f01520
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 6 additions and 1 deletions

@ -228,7 +228,6 @@ bool Checker::check_access(const ToCheck & item, void *base, type_identity *iden
} }
return false; return false;
#undef FAIL_PTR #undef FAIL_PTR
#undef UNINIT_PTR
} }
bool Checker::check_vtable(const ToCheck & item, void *vtable, type_identity *identity) bool Checker::check_vtable(const ToCheck & item, void *vtable, type_identity *identity)
@ -388,6 +387,12 @@ void Checker::check_dispatch(const ToCheck & item)
return; return;
} }
if (reinterpret_cast<uintptr_t>(item.ptr) == UNINIT_PTR)
{
// allow uninitialized raw pointers
return;
}
if (!check_access(item, item.ptr, item.identity) && item.identity->type() != IDTYPE_GLOBAL) if (!check_access(item, item.ptr, item.identity) && item.identity->type() != IDTYPE_GLOBAL)
{ {
return; return;