Skip to content

Commit 064ffc2

Browse files
committed
Fix the indexed-ISA metadata reader by properly initializing IsaIndexShift.
Unfortunately, I'm flying blind a bit --- this code is hard to test outside of an integrated environment on a target using the ABI in question, and I don't have such an environment set up --- so I'm left with this rather ugly process of iteratively submitting patches for trivial bugs and waiting for the bots to deliver judgment. The environment could be mocked with a test environment that used a nonstandard ObjC ABI, but that would actually take a lot of work because of Swift's assumptions about the ObjC ABI: we'd basically have to configure the test environment as a real, proper target, possibly all the way through LLVM.
1 parent 834f7e2 commit 064ffc2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,10 @@ class MetadataReader {
13531353
if (IsaMagicMask != 0) {
13541354
tryFindAndReadSymbol(IsaMagicValue,
13551355
"objc_debug_indexed_isa_magic_value");
1356-
tryFindAndReadSymbol(IsaMask, "objc_debug_indexed_isa_index_mask");
1356+
tryFindAndReadSymbol(IsaIndexMask,
1357+
"objc_debug_indexed_isa_index_mask");
1358+
tryFindAndReadSymbol(IsaIndexShift,
1359+
"objc_debug_indexed_isa_index_shift");
13571360
tryFindSymbol(indexedClasses, "objc_indexed_classes");
13581361
IndexedClassesPointer = indexedClasses.getAddressData();
13591362
tryFindSymbol(indexedClassesCount, "objc_indexed_classes_count");

0 commit comments

Comments
 (0)