Files
swift-mirror/include/swift/RemoteInspection/ReflectionContext.h
Mike Ash 027cc09c2d [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
2025-04-24 12:54:35 -04:00

84 KiB