mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix test crash in swift-reflection-dump rdar://60966825 (#30737)
Return a 32-bit or 64-bit ptrauth mask appropriate for the target. This should correct a crash when a 64-bit swift-reflection-dump executable was used to inspect a 32-bit target binary. Resolves rdar://60966825
This commit is contained in:
@@ -478,9 +478,16 @@ public:
|
||||
case DLQ_GetPtrAuthMask: {
|
||||
// We don't try to sign pointers at all in our view of the object
|
||||
// mapping.
|
||||
auto result = static_cast<uintptr_t *>(outBuffer);
|
||||
*result = (uintptr_t)~0ull;
|
||||
return true;
|
||||
if (wordSize == 4) {
|
||||
auto result = static_cast<uint32_t *>(outBuffer);
|
||||
*result = (uint32_t)~0ull;
|
||||
return true;
|
||||
} else if (wordSize == 8) {
|
||||
auto result = static_cast<uint64_t *>(outBuffer);
|
||||
*result = (uint64_t)~0ull;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case DLQ_GetObjCReservedLowBits: {
|
||||
auto result = static_cast<uint8_t *>(outBuffer);
|
||||
|
||||
Reference in New Issue
Block a user