Files
swift-mirror/include/swift/RemoteInspection/RuntimeInternals.h
Mike Ash 2452f27e0f [6.2][RemoteMirror] Only look through Task wait adapters when there's a dependency record.
When the RunJob pointer is set to adapters, we try to get the "real" run pointer from the context. However, there are cases where the context can be a dangling pointer, when the task has finished with it but hasn't reset the pointer to anything else. For cases where that can happen, the context is legitimate only when there's a dependency record. Check for a dependency record before trying to read the context in those cases.

In most uses this will fail gracefully or return a garbage run pointer, but swift-reflection-test uses an in-process memory reader which can crash when trying to chase this pointer, resulting in test failures.

rdar://149252404
(cherry picked from commit 027cc09c2d)
2025-04-25 09:16:00 -04:00

6.1 KiB