Skip to content

Conversation

@vcsjones
Copy link
Member

@vcsjones vcsjones commented Aug 5, 2025

This test was allocating arrays that were nearly 2GB in size in order to attempt to test an edge case around seek overflowing. These large allocations are very unstable in CI and started failing for Android + CoreCLR.

The test is already disabled for Linux, for iOS, for tvOS, and partially for Windows. Rather than disable it for yet another platform, let's just not test the very large allocation sizes. At this point the test has been disabled on so many platforms for being problematic we aren't getting much value from the large allocations.

Fixes #92467
Fixes #100225
Fixes #100558
Fixes #118353

This test was allocating arrays that were nearly 2GB in size in order to attempt to test an edge case around seek overflowing. These large allocations are very unable in CI and started failing for Android + CoreCLR.

The test is already disabled for Linux, for iOS, for tvOS, and partially for Windows. Rather than disable it yet again, let's just not test the very large allocation sizes. At this point the test has been disabled on so many platforms for being problematic we aren't getting much value from the large allocations.
Copilot AI review requested due to automatic review settings August 5, 2025 16:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes problematic 2GB memory allocations from the MemoryStream_SeekOverflow_Throws test that were causing CI failures across multiple platforms. The test was already disabled on many platforms (Linux, iOS, tvOS, and partially Windows) due to these large allocation issues.

  • Removes the Array.MaxLength test data entries that were causing 2GB allocations
  • Removes platform-specific skip attributes and issue tracking attributes
  • Changes from ConditionalTheory to Theory since 64-bit process requirement is no longer needed

@vcsjones
Copy link
Member Author

vcsjones commented Aug 5, 2025

In fact we are adding back test coverage by removing the 2 GB allocations. We were disabling the test wholesale on many platforms, but not all of the theories were creating large allocations. Now we are back to testing the small allocations on more platforms.

@vcsjones vcsjones added the test-enhancement Improvements of test source code label Aug 5, 2025
@jkotas
Copy link
Member

jkotas commented Aug 5, 2025

Thanks!

@jkotas jkotas merged commit d9be719 into dotnet:main Aug 5, 2025
83 of 85 checks passed
@vcsjones vcsjones deleted the stop-2g-allocates-in-tests branch August 5, 2025 21:24
@vcsjones vcsjones added this to the 10.0.0 milestone Aug 16, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.