Skip to content

Comments

Skip Iri_UnicodePlane3_13 test on 32-bit platforms to prevent OOM#124486

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-out-of-memory-exception
Draft

Skip Iri_UnicodePlane3_13 test on 32-bit platforms to prevent OOM#124486
Copilot wants to merge 2 commits intomainfrom
copilot/fix-out-of-memory-exception

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Description

The Iri_UnicodePlane3_13 test fails with OutOfMemoryException on 32-bit platforms. The test processes Unicode planes 3-13 (0x30000-0xDFFFF), creating a string of 720,895 characters that allocates several hundred MB—exceeding 32-bit addressable memory limits.

Changes

  • Changed [Fact] to [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] for Iri_UnicodePlane3_13 test
  • Test now skips on 32-bit processes, runs on 64-bit as before

Other Unicode plane tests (0-2, 14, 15-16) process only single planes (~65K characters each) and remain unaffected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Test failure: System.PrivateUri.Tests.IriTest.Iri_UnicodePlane3_13</issue_title>
<issue_description>Failed in: runtime-coreclr libraries-jitstress 20260212.1

Failed tests:

net11.0-windows-Release-x86-jitstress2-Windows.10.Amd64.Open
- System.PrivateUri.Tests.IriTest.Iri_UnicodePlane3_13

Error message:

System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.

Stack trace:

   at System.GC.<AllocateUninitializedArray>g__AllocateNewArrayWorker|77_0[T](Int32 length, Boolean pinned) in /_/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs:line 831
   at System.Buffers.SharedArrayPool`1.Rent(Int32 minimumLength) in /_/src/libraries/System.Private.CoreLib/src/System/Buffers/SharedArrayPool.cs:line 107
   at System.Text.ValueStringBuilder.Grow(Int32 additionalCapacityBeyondPos) in /_/src/libraries/Common/src/System/Text/ValueStringBuilder.cs:line 265
   at System.UriHelper.EscapeStringToBuilder(ReadOnlySpan`1 stringToEscape, ValueStringBuilder& vsb, SearchValues`1 noEscape, Boolean checkExistingEscaped) in /_/src/libraries/System.Private.Uri/src/System/UriHelper.cs:line 276
   at System.Uri.GetCanonicalPath(ValueStringBuilder& dest, UriFormat formatAs) in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 4202
   at System.Uri.RecreateParts(ValueStringBuilder& dest, String str, UriComponents parts, UInt16 nonCanonical, UriFormat formatAs) in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 2893
   at System.Uri.RecreateParts(UriComponents parts, UInt16 nonCanonical, UriFormat formatAs) in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 2729
   at System.Uri.GetEscapedParts(UriComponents uriParts) in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 2681
   at System.Uri.GetComponentsHelper(UriComponents uriComponents, UriFormat uriFormat) in /_/src/libraries/System.Private.Uri/src/System/UriExt.cs:line 869
   at System.Uri.InternalGetComponents(UriComponents components, UriFormat format) in /_/src/libraries/System.Private.Uri/src/System/UriExt.cs:line 317
   at System.Uri.get_AbsoluteUri() in /_/src/libraries/System.Private.Uri/src/System/Uri.cs:line 777
   at System.PrivateUri.Tests.IriTest.EscapeUnescapeTestComponent(String uriInput, UriComponents component) in /_/src/libraries/System.Private.Uri/tests/FunctionalTests/IriTest.cs:line 383
   at System.PrivateUri.Tests.IriTest.VerifyUriNormalizationForEscapedCharacters(String uriInput) in /_/src/libraries/System.Private.Uri/tests/FunctionalTests/IriTest.cs:line 311
   at System.PrivateUri.Tests.IriTest.Iri_UnicodePlane3_13() in /_/src/libraries/System.Private.Uri/tests/FunctionalTests/IriTest.cs:line 244
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57
```</issue_description>

<agent_instructions>Disable this specific test when running on 32bit as it can allocate a few hundred MB of memory</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix test failure due to OutOfMemoryException Skip Iri_UnicodePlane3_13 test on 32-bit platforms to prevent OOM Feb 16, 2026
Copilot AI requested a review from MihaZupan February 16, 2026 22:55
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Is 64-bit" is not really a good proxy for "has a lot of memory" anymore. Mobile devices (Android / iOS) are 64-bit but tend to be memory constrained anyway. See RunGetBitLengthTestsLarge as another such example.

Consider marking this OuterLoop as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: System.PrivateUri.Tests.IriTest.Iri_UnicodePlane3_13

3 participants