mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Iterating child tasks depends on knowing the size of AsyncTask, and changing the size of the task broke it. Instead of relying on mirroring the full structure in our out-of-process definitions, add a debug variable to libswift_Concurrency that contains the size of AsyncTask.
While we're there, add some more validation to child task enumeration. Check each child task's metadata pointer to make sure that it actually points to the AsyncTask metadata, and have the inner loop also increment and check ChildTaskLoopCount to stop runaway iteration in that loop.
rdar://148836760
(cherry picked from commit e3057031da)
The modules in the 'stdlib/private' directory contain APIs that are considered private to the Swift project. Don't use them outside of the repositories related to the Swift project. These APIs are used for building Swift build and test automation tools, represent early prototypes of APIs that are not intended to be included in the standard library soon, modules to support ports to other platforms, and other similar needs that are private to the Swift project and its development process.