Skip to content

Commit b2e2bd2

Browse files
committed
[Reflection] Fix task reflection to strip signed pointers.
The task resume context may be signed, so we should strip the pointer before trying to read through it. rdar://158728756
1 parent d7ca06d commit b2e2bd2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/swift/RemoteInspection/ReflectionContext.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,10 @@ class ReflectionContext
18571857
RemoteAddress(RecordObj->Parent, RemoteAddress::DefaultAddressSpace);
18581858
}
18591859

1860-
const auto TaskResumeContext = AsyncTaskObj->ResumeContextAndReserved[0];
1860+
const auto TaskResumeContext = stripSignedPointer(
1861+
RemoteAddress(AsyncTaskObj->ResumeContextAndReserved[0],
1862+
RemoteAddress::DefaultAddressSpace)
1863+
).getRawAddress();
18611864
Info.ResumeAsyncContext = TaskResumeContext;
18621865

18631866
// Walk the async backtrace.

0 commit comments

Comments
 (0)