|
|
|
@ -78,15 +78,21 @@ bool Checker::queue_item(const QueueItem & item, const CheckedStructure & cs)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto overlap = data.lower_bound(item.ptr);
|
|
|
|
|
auto overlap_start = data.lower_bound(item.ptr);
|
|
|
|
|
auto overlap_end = data.lower_bound(ptr_end);
|
|
|
|
|
while (overlap != overlap_end)
|
|
|
|
|
for (auto overlap = overlap_start; overlap != overlap_end; overlap++)
|
|
|
|
|
{
|
|
|
|
|
auto offset = uintptr_t(overlap->first) - uintptr_t(item.ptr);
|
|
|
|
|
if (!cs.find_field_at_offset_with_type(offset, overlap->second.second))
|
|
|
|
|
{
|
|
|
|
|
// TODO
|
|
|
|
|
FAIL("TODO: handle merging structures: " << overlap->second.first << " overlaps " << item.path << " (forward)");
|
|
|
|
|
overlap++;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
data.erase(overlap_start, overlap_end);
|
|
|
|
|
|
|
|
|
|
data[item.ptr] = std::make_pair(item.path, cs);
|
|
|
|
|
queue.push_back(item);
|
|
|
|
|
return true;
|
|
|
|
@ -326,7 +332,7 @@ void Checker::dispatch_pointer(const QueueItem & item, const CheckedStructure &
|
|
|
|
|
auto target = static_cast<pointer_identity *>(cs.identity)->getTarget();
|
|
|
|
|
if (!target)
|
|
|
|
|
{
|
|
|
|
|
check_unknown_pointer(item);
|
|
|
|
|
check_unknown_pointer(target_item);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -362,6 +368,10 @@ void Checker::dispatch_container(const QueueItem & item, const CheckedStructure
|
|
|
|
|
{
|
|
|
|
|
// TODO: check deque?
|
|
|
|
|
}
|
|
|
|
|
else if (base_container == "DfArray<void>")
|
|
|
|
|
{
|
|
|
|
|
// TODO: check DfArray
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
UNEXPECTED;
|
|
|
|
@ -486,6 +496,11 @@ void Checker::dispatch_enum(const QueueItem & item, const CheckedStructure & cs)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_in_global(item) && enum_value == 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto enum_name = get_enum_item_key(enum_type, enum_value);
|
|
|
|
|
if (!enum_name)
|
|
|
|
|
{
|
|
|
|
|