You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-3002: DispatchData.enumerateBytes on Linux leaks the block
To avoid leaking the block parameter of enumerateBytes,
we need to directly call CDispatch.dispatch_data_apply
(not _swift_dispatch_data_apply). However, we need to tell
the compiler that the internal closure that translates between
the C and Swift layers will not cause the captured block
parameter to escape. If SR-2313 were implemented, we could use
withoutActuallyEscaping. Since withoutActuallyEscaping is not available,
we instead use unsafeBitCast to bypass the compiler's analysis.
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
0 commit comments