-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Restrict indentation size in JsonWriterOptions theories. #101498
Restrict indentation size in JsonWriterOptions theories. #101498
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
@@ -7637,7 +7637,7 @@ private static IEnumerable<JsonWriterOptions> JsonOptions() | |||
return from indented in new[] { true, false } | |||
from skipValidation in new[] { true, false } | |||
from indentCharacter in indented ? new char?[] { null, ' ', '\t' } : [] | |||
from indentSize in indented ? new int?[] { null, 0, 1, 2, 127 } : [] | |||
from indentSize in indented ? new int?[] { null, 0, 1, 2, 3 } : [] |
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.
Why would the indent size result in OOMs? Significantly larger buffer sizes?
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.
Correct. The impacted test creates very deep objects so a large indent size would contribute to substantially bigger buffer sizes.
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Utf8JsonWriterTests.cs
Show resolved
Hide resolved
We will need this backported to release/9.0-preview4 to clean up the large amount of related failures. |
@carlossanlop Can you backport this when ready? |
I was able to link all CI failures to a KnownBuildError except for one, which would be impossible to match to an ErrorMessage and would end up grouping anything. I described it here: #101524 (comment) For that reason, I will make an exception and will JIT elevate myself to bypass the merge on green restriction. |
/backport to release/9.0-preview4 |
Started backporting to release/9.0-preview4: https://github.com/dotnet/runtime/actions/runs/8826312659 |
Fix #101470.