Skip to content

Commit 315264b

Browse files
committed
Add misc cancellation points in RTTI analysis
Some missing checks in case there is a billion segments (see .obj files)
1 parent e301d99 commit 315264b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

plugins/rtti/itanium.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,8 @@ void ItaniumRTTIProcessor::ProcessRTTI()
685685
// Scan data sections for rtti.
686686
for (const Ref<Section> &section: m_view->GetSections())
687687
{
688+
if (bgTask->IsCancelled())
689+
break;
688690
if (section->GetSemantics() == ReadOnlyDataSectionSemantics)
689691
{
690692
m_logger->LogDebug("Attempting to find RTTI in section %llx", section->GetStart());

plugins/rtti/microsoft.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,8 @@ void MicrosoftRTTIProcessor::ProcessVFT()
733733
auto rdataSection = m_view->GetSectionByName(".rdata");
734734
for (const Ref<Segment> &segment: m_view->GetSegments())
735735
{
736+
if (bgTask->IsCancelled())
737+
break;
736738
if (segment->GetFlags() == (SegmentReadable | SegmentContainsData))
737739
{
738740
m_logger->LogDebug("Attempting to find VirtualFunctionTables in segment %llx", segment->GetStart());

0 commit comments

Comments
 (0)