[Reflection] Fix iterateAsyncTaskAllocations.

Fix the declaration of AsyncTask and add a test for iterateAsyncTaskAllocations. Reflection's declaration of AsyncTask had fallen out of sync with the real thing. The test that was supposed to catch this was never actually committed, oops.

Add a swift_reflection_libraryVersion variable to Remote Mirror to indicate the presence of this fix. In the future, the value can be incremented to signal the presence of other changes that can't otherwise be detected.

rdar://80035307
This commit is contained in:
Mike Ash
2021-07-01 14:18:06 -04:00
parent 92b7e135b8
commit c0e6e1d878
5 changed files with 77 additions and 16 deletions

View File

@@ -1361,9 +1361,7 @@ public:
if (!AsyncTaskObj)
return std::string("failure reading async task");
auto *Allocator = reinterpret_cast<const StackAllocator *>(
&AsyncTaskObj->AllocatorPrivate);
StoredPointer SlabPtr = Allocator->FirstSlab;
StoredPointer SlabPtr = AsyncTaskObj->PrivateStorage.Allocator.FirstSlab;
while (SlabPtr) {
auto SlabBytes = getReader().readBytes(
RemoteAddress(SlabPtr), sizeof(typename StackAllocator::Slab));