warn about misidentified generic pointers

update structures
develop
Ben Lubar 2020-02-21 18:49:02 -06:00
parent 53da38ca47
commit 57154e33c8
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
2 changed files with 7 additions and 4 deletions

@ -1 +1 @@
Subproject commit 6dcfd4210cbffb71127f8dd8eef170e149990d40
Subproject commit 874ad8936e9f29cd616d76ebdc93fef958ded379

@ -560,14 +560,17 @@ bool Checker::maybe_queue_tagged_union(const ToCheck & item, const struct_field_
void Checker::check_dispatch(const ToCheck & item)
{
if (!item.identity)
if (reinterpret_cast<uintptr_t>(item.ptr) == UNINIT_PTR)
{
// allow uninitialized raw pointers
return;
}
if (reinterpret_cast<uintptr_t>(item.ptr) == UNINIT_PTR)
if (!item.identity)
{
// allow uninitialized raw pointers
// warn about bad pointers
check_access(item, item.ptr, df::identity_traits<void *>::get(), 1);
return;
}