Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit c969911

Browse files
committed
Tighten tagged pointer mask, handle tagged pointers in objc_method_t
1 parent 941a3c4 commit c969911

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Core/Analyzers/ClassAnalyzer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ MethodListInfo ClassAnalyzer::analyzeMethodList(uint64_t address)
3636
mi.typeAddress = mi.address + 4 + static_cast<int32_t>(m_file->readInt());
3737
mi.implAddress = mi.address + 8 + static_cast<int32_t>(m_file->readInt());
3838
} else {
39-
mi.nameAddress = m_file->readLong();
40-
mi.typeAddress = m_file->readLong();
41-
mi.implAddress = m_file->readLong();
39+
mi.nameAddress = arp(m_file->readLong());
40+
mi.typeAddress = arp(m_file->readLong());
41+
mi.implAddress = arp(m_file->readLong());
4242
}
4343

4444
if (!mli.hasRelativeOffsets() || mli.hasDirectSelectors()) {

Include/ObjectiveNinjaCore/ABI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ObjectiveNinja::ABI {
1414
/**
1515
* Bitmask used to remove the tags from a tagged pointer.
1616
*/
17-
constexpr uint64_t PointerMask = 0xFFFFFFFFF;
17+
constexpr uint64_t PointerMask = 0x7FFFFFFFF;
1818

1919
/**
2020
* Mask used to extract the flags from a Swift class data structure pointer.

0 commit comments

Comments
 (0)