Skip to content

Commit

Permalink
Populate unalignedAccess for indirect search results
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgiepoo committed Apr 12, 2024
1 parent ca5452a commit 1e7c22a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Bit Slicer/ZGSearchFunctions.mm
Expand Up @@ -2330,6 +2330,8 @@ static int _sortPointerMapTable(const void *entry1, const void *entry2)
ZGMemoryAddress maxPointerValue = searchData.endAddress;
ZGMemoryAddress minPointerValue = MAX(firstTotalStaticSegmentRangeValue.rangeValue.location, searchData.beginAddress);

ZGMemorySize dataAlignment = searchData.dataAlignment;

if (needsToBuildPointerTableData || previousSearchResults != nil)
{
BOOL includeSharedMemory = searchData.includeSharedMemory;
Expand All @@ -2349,8 +2351,6 @@ static int _sortPointerMapTable(const void *entry1, const void *entry2)
narrowRegionsTable = nullptr;
}

ZGMemorySize dataAlignment = searchData.dataAlignment;

if (needsToBuildPointerTableData)
{
pointerTableData = [NSMutableData data];
Expand Down Expand Up @@ -2667,8 +2667,7 @@ static int _sortPointerMapTable(const void *entry1, const void *entry2)

[resultSets insertObjects:staticMainExecutableResultSets atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, staticMainExecutableResultSets.count)]];

// Assume unaligned access for now(?)
BOOL unalignedAccess = NO;
BOOL unalignedAccess = (dataAlignment == 1);
ZGSearchResults *indirectSearchResults = [[ZGSearchResults alloc] initWithResultSets:[resultSets copy] resultType:ZGSearchResultTypeIndirect dataType:indirectDataType stride:stride unalignedAccess:unalignedAccess];

indirectSearchResults.indirectMaxLevels = maxLevels;
Expand Down

0 comments on commit 1e7c22a

Please sign in to comment.