-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add System.Text fuzzing for encoders #103968
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-encoding |
1 similar comment
Tagging subscribers to this area: @dotnet/area-system-text-encoding |
// However, this test class, while running under .NET Core, was used to foward the fuzzing | ||
// input to a .NET Framework console app. That app had the same test semantics as the tests | ||
// here, although used slightly different supporting APIs since not all supporting library | ||
// and language features are present in .NET Framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how this is working? I am not seeing any forwarding to console app here? is it done somewhere else when you do #define FORWARD_TO_NETFRAMEWORK
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code to do this was removed from this PR for a few reasons, but exists in the commit history. See 94010d8#diff-1249360cc8e4b2057cb1111a705788d87911917d770743eae1779847159f9790R66-R67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Wondering if we are doing the fuzzing only on the limited set of encodings? or we are gong to extend that to other SBCP/DBCP encodings?
The original ask for fuzzing here was to just cover the basic encodings here. We could of course expand on this pending feedback. |
This fuzzes all standard encoders including: Latin1 (ISO-8859-1), ASCIIEncoding, UnicodeEncoding, Utf32Encoding, Utf7Encoding, and Utf8Encoding.
Notes:
DecoderFallbackException
when invalid input is received.The fuzz tests were run for ~24 hours locally without any failures. This included .NET Framework. FWIW the last few lines from the tests: