Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove larger test length for Iri_ExpandingContents_TestData - #131070

#131070
Merged
MihaZupan merged 1 commit into
maindotnet/runtime:mainfrom
MihaZupan-patch-1dotnet/runtime:MihaZupan-patch-1Copy head branch name to clipboard
Jul 20, 2026
Merged

Remove larger test length for Iri_ExpandingContents_TestData#131070
MihaZupan merged 1 commit into
maindotnet/runtime:mainfrom
MihaZupan-patch-1dotnet/runtime:MihaZupan-patch-1Copy head branch name to clipboard

Conversation

@MihaZupan

Copy link
Copy Markdown
Member

Closes #130786

The 1 million length test will end up allocating a ~9 million character string for ToString.
Together with all the other properties we're allocating and various buffers, this could reach some ~100 MB.

The test case was added when I removed the length restriction on Uris. The 66k case should already give us coverage for the important "longer than ushort" scenarios.

@MihaZupan MihaZupan added this to the 11.0.0 milestone Jul 20, 2026
@MihaZupan MihaZupan self-assigned this Jul 20, 2026
Copilot AI review requested due to automatic review settings July 20, 2026 10:27
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@MihaZupan
MihaZupan enabled auto-merge (squash) July 20, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reduces the maximum input size used by the Iri_ExpandingContents_Accepted test data to avoid excessive allocations during URI property evaluation (notably ToString()), while preserving coverage for “longer than ushort” scenarios.

Changes:

  • Removed the 1_000_000 length case from Iri_ExpandingContents_TestData.
  • Retained 66_000 as the “large” case to continue exercising length-expansion behavior beyond ushort.MaxValue.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
  "version": 5,
  "last_dispatched_commit": "23f760f067a6ef93bfb750718aeb56496bc3d9c5",
  "last_dispatched_base_ref": "main",
  "last_dispatched_base_sha": "d349aa7988e9adf0ee0f5f0473886c0582975955",
  "last_reviewed_commit": "23f760f067a6ef93bfb750718aeb56496bc3d9c5",
  "last_reviewed_base_ref": "main",
  "last_reviewed_base_sha": "d349aa7988e9adf0ee0f5f0473886c0582975955",
  "last_recorded_worker_run_id": "29737569462",
  "review_attempt_commit": "",
  "review_attempt_base_ref": "",
  "review_attempt_count": 0,
  "max_review_attempts": 5,
  "review_history_format": "holistic-review-disclosure-v1",
  "review_history": [
    {
      "commit": "23f760f067a6ef93bfb750718aeb56496bc3d9c5",
      "review_id": 4734449689
    }
  ]
}

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: The Iri_ExpandingContents_TestData case with length = 1_000_000 produces a ~9M-character string for ToString plus additional properties and buffers, causing memory pressure (~100 MB) that can lead to OOM/instability (issue #130786). Removing the largest length reduces this cost while keeping meaningful coverage.

Approach: A single-line change drops 1_000_000 from the { 1, 64_000, 66_000, 1_000_000 } length array feeding the theory data. The remaining 66_000 case still exercises the important "longer than ushort" (> 65,535) code path that motivated these cases when the Uri length restriction was removed, so coverage of the boundary behavior is preserved.

Summary: This is a low-risk, well-targeted test-only change. It removes an expensive test input that risks memory exhaustion without sacrificing coverage of the > ushort length scenarios (still covered by the 64k/66k cases). No production code is affected and no correctness concerns arise. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 27.2 AIC · ⌖ 15.5 AIC · ⊞ 10K

@MihaZupan
MihaZupan requested a review from a team July 20, 2026 15:55
@MihaZupan
MihaZupan merged commit 8450cb8 into main Jul 20, 2026
94 checks passed
@MihaZupan
MihaZupan deleted the MihaZupan-patch-1 branch July 20, 2026 15:55
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: Iri_ExpandingContents_Accepted throws OutOfMemoryException

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.