The field holding the "ro" will now be a union. If the low bit is set,
then it isn't an ro and it needs to be dereferenced once more to get to
it. If the low bit isn't set, then it is a proper class_ro_t
No dedicated test is needed as this code path will trigger when running
the existing Objective-C tests under a current version of the runtime.
m_firstSubclass = extractor.GetAddress_unchecked(&cursor);
m_nextSiblingClass = extractor.GetAddress_unchecked(&cursor);
+ if (m_ro_ptr & 1) {
+ DataBufferHeap buffer(ptr_size, '\0');
+ process->ReadMemory(m_ro_ptr ^ 1, buffer.GetBytes(), ptr_size, error);
+ if (error.Fail())
+ return false;
+ cursor = 0;
+ DataExtractor extractor(buffer.GetBytes(), ptr_size,
+ process->GetByteOrder(),
+ process->GetAddressByteSize());
+ m_ro_ptr = extractor.GetAddress_unchecked(&cursor);
+ }
+
return true;
}