Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of the assertions in the TextFormat fuzz-originated unit tests checked that we failed to decode a string built from a sequence of bytes. However, this sequence of bytes had invalid UTF8 characters.
Foundation
has improved in recent betas and now fails to build a String from this sequence (which it didn't before). This is causing the test to fail.If the String couldn't have been constructed during fuzz testing, the test would have passed - see:
swift-protobuf/FuzzTesting/Sources/FuzzTextFormat/main.swift
Line 20 in 601e03a
We should tolerate the String not being constructed here without failing the test, as it's the correct (and current) behaviour. This means that after this PR, assertions will be skipped when a String cannot be constructed.
However, we shouldn't simply remove the failing assertion, because in the case
Foundation
introduces this bug again, we should make sure we're failing the TextFormat decoding.