Skip to content

0.4.1

Latest
Compare
Choose a tag to compare
@karwa karwa released this 04 Oct 18:34
· 15 commits to main since this release

TSan Workaround

This release includes a workaround for a bug in TSan.
PR #168
Issue #166 (thanks to @shadowfacts for the report)

TSan's internal bookkeeping seems to be corrupted if you use pass around an empty struct as an inout parameter. This pattern is sometimes used by generic algorithms (for example, the standard library's SystemRandomNumberGenerator is an empty struct), and is used internally by WebURL. There is no actual data race, but the corruption of TSan's bookkeeping data can lead to spurious reports of data races or even null-pointer dereferences within the TSan runtime.

To work around this, we add an unused field to these empty structs in debug builds.

Related bug reports: apple/swift#61073 apple/swift#61244 and apple/swift#56405

Improvements to Testing

Additionally, some tests to Foundation extensions have been refactored, and the "Swifter" HTTP server dependency that was used by some tests has been dropped.