Restrict indentation size in JsonWriterOptions theories.#101498
Restrict indentation size in JsonWriterOptions theories.#101498carlossanlop merged 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
| 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.
Why would the indent size result in OOMs? Significantly larger buffer sizes?
There was a problem hiding this comment.
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.