Skip to content

Commit 3edef36

Browse files
committed
[RTTI] Fix itanium vft analysis adding misaligned functions for thumb2
Fixes #6959
1 parent 1191986 commit 3edef36

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/rtti/itanium.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ std::optional<VirtualFunctionTableInfo> ItaniumRTTIProcessor::ProcessVFT(uint64_
588588
{
589589
// TODO: Is likely a function check here?
590590
m_logger->LogDebug("Discovered function from virtual function table... %llx", vFuncAddr);
591-
m_view->AddFunctionForAnalysis(m_view->GetDefaultPlatform(), vFuncAddr, true);
591+
auto vftPlatform = m_view->GetDefaultPlatform()->GetAssociatedPlatformByAddress(vFuncAddr);
592+
m_view->AddFunctionForAnalysis(vftPlatform, vFuncAddr, true);
592593
}
593594
}
594595
// Only ever add one function.

plugins/rtti/microsoft.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ std::optional<VirtualFunctionTableInfo> MicrosoftRTTIProcessor::ProcessVFT(uint6
499499
}
500500
// TODO: Is likely a function check here?
501501
m_logger->LogDebug("Discovered function from virtual function table... %llx", vFuncAddr);
502-
auto vFunc = m_view->AddFunctionForAnalysis(m_view->GetDefaultPlatform(), vFuncAddr, true);
502+
auto vftPlatform = m_view->GetDefaultPlatform()->GetAssociatedPlatformByAddress(vFuncAddr);
503+
auto vFunc = m_view->AddFunctionForAnalysis(vftPlatform, vFuncAddr, true);
503504
virtualFunctions.emplace_back(vFuncAddr, vFunc ? std::optional(vFunc) : std::nullopt);
504505
}
505506
else

0 commit comments

Comments
 (0)