Tags: keke233/swift-nio
Tags
Allocation diffing script no longer drops data. (apple#1513) Allocation diffing script no longer drops data. Motivation: Looking at allocations is hard enough without the script getting the allocation counts wrong. Modifications: Where multiple allocations resolved to the same "key" only the last allocation was accounted for. I have changed the script to store all allocations - still keyed in the same way. When diffing the total number of allocations is used - if they are different the total and all contributing stack traces are output. Added a total for all allocations everywhere at the end together with a difference number. Output all stack traces before and after contributing to a detected diff. Update the documentation to reflect changes. Change the threshold for reporting diffs from > 1000 to >= 1000. This means if allocations go from 1000 to 2000 they are reported as a difference rather than a new allocation. Result: It is now easier - if somewhat more verbose to compare allocations.
bootstraps: offer ELG validation (apple#1464) Motivation: Today, we just expect the ELGs passed to the bootstraps to be the correct ones, if not, we crash. Modifications: Offer an alternative `validatingGroup:` `init` that just returns `nil` if the ELGs are of the wrong types. Result: Easier to work with multi-stack systems for example when the user might pass an ELG for either NIO on Sockets or NIO on Network.framework.
testSafeToExecute*: fix threading issues (apple#1455) Motivation: testSafeToExecuteTrue/False accessed an internal property of the event loop without synchronisation. Modifications: Fix the threading issue. Result: Tests with TSan happy.
add AcceptHandler after serverChannelInitializer runs (apple#1393) Motivation: For compatibility with 2.13.1 and earlier, we're adding the AcceptHandler after the serverChannelInitializer runs. If that's the best solution is discussed in apple#1392. Modifications: - add AcceptHandler after the serverChannelInitializer - give the AcceptHandler the name AcceptHandler Result: - better compatibility
Update http-parser for CVE. Motivation: http-parser shipped a patche for node.js CVE-2019-15605, which allowed HTTP request smuggling. This affected SwiftNIO as well, and so we need to immediately ship an update to help protect affected users. A CVE for SwiftNIO will follow, but as this patch is in the wild and SwiftNIO is known to be affected we should not delay shipping this fix. Modifications: - Update http-parser. - Add regression tests to validate this behaviour. Result: Close request smugging vector. (cherry picked from commit f94b22b)
Update http-parser for CVE. (apple#1388) Motivation: http-parser shipped a patche for node.js CVE-2019-15605, which allowed HTTP request smuggling. This affected SwiftNIO as well, and so we need to immediately ship an update to help protect affected users. A CVE for SwiftNIO will follow, but as this patch is in the wild and SwiftNIO is known to be affected we should not delay shipping this fix. Modifications: - Update http-parser. - Add regression tests to validate this behaviour. Result: Close request smugging vector. (cherry picked from commit f94b22b)
Rename misnamed closure parameter argument in ServerBootstrap.bind0 (a… …pple#1347) Motivation: Non-functional change: `bind0(_ makeSocketAddress: () throws -> SocketAddress) -> EventLoopFuture<Channel>` calls `bind0` with a `register` closure that is passed an event loop as first argument. However, the name of the first parameter of the closure declaration is named "eventGroup" which is confusing. It should therefore be renamed to "eventLoop" which is consistent with other closures passed as `register` arguments at other callsites. Modifications: Rename (unused) closure parameter "eventGroup" to "eventLoop". Result: Improved code readability. Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
Drain scheduled tasks on EmbeddedChannel finish() (apple#1319) Motivation: EmbeddedChannel advanced time to the distant future so that all scheduled tasks would be run. However, if tasks were recursively scheduled by executing the already scheduled tasks then the channel would never finish. Modifications: When calling finish() on EmbeddedChannel, only run the tasks which have been scheduled at that point in time. Result: Recursively scheduled tasks terminate when finish-ing the EmbeddedChannel.
workaround failed associated type inference (apple#1299) Motivation: Some Swift nightly snapshots fail to compile NIO in release mode (rdar://57793267), this change is to work around this issue by telling them compiler the associatedtypes explicitly. Modifications: - add `Element` and `Indices` typealises to `CircularBuffer` explicitly. Result: Complies on all nightlies also in release mode.
PreviousNext