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

Commit

Permalink
Tighten tagged pointer mask, handle tagged pointers in objc_method_t
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpalmisc committed Feb 16, 2022
1 parent 941a3c4 commit c969911
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Core/Analyzers/ClassAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ MethodListInfo ClassAnalyzer::analyzeMethodList(uint64_t address)
mi.typeAddress = mi.address + 4 + static_cast<int32_t>(m_file->readInt());
mi.implAddress = mi.address + 8 + static_cast<int32_t>(m_file->readInt());
} else {
mi.nameAddress = m_file->readLong();
mi.typeAddress = m_file->readLong();
mi.implAddress = m_file->readLong();
mi.nameAddress = arp(m_file->readLong());
mi.typeAddress = arp(m_file->readLong());
mi.implAddress = arp(m_file->readLong());
}

if (!mli.hasRelativeOffsets() || mli.hasDirectSelectors()) {
Expand Down
2 changes: 1 addition & 1 deletion Include/ObjectiveNinjaCore/ABI.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ObjectiveNinja::ABI {
/**
* Bitmask used to remove the tags from a tagged pointer.
*/
constexpr uint64_t PointerMask = 0xFFFFFFFFF;
constexpr uint64_t PointerMask = 0x7FFFFFFFF;

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

0 comments on commit c969911

Please sign in to comment.