Motivation:
Our kqueue filter set differ logic attempted to stack allocate some
kevent objects and then treat them as a fixed size array by creating a
tuple and then grabbing a pointer to it. That's fairly gratuitously
unsafe, and we should shrink the amount of code that can touch unsafe
stuff.
Modifications:
- Defined KeventTriple, a value type that encapsulates a fixed-size
array and a length.
- Rewrote calculateKQueueFilterSetChanges to use the new type.
Result:
Safer code in the NIO core
Co-authored-by: George Barnett <gbarnett@apple.com>