Skip to content

Fix array and string slicing overflow for extreme bounds - #20557

Open
T-Gro wants to merge 5 commits into
mainfrom
fix/issue-20530
Open

T-Gro wants to merge 5 commits into
mainfrom
fix/issue-20530

Conversation

@T-Gro

@T-Gro T-Gro commented Sep 15, 2026

Copy link
Copy Markdown
Member

Fixes #20530

Array and string slices with extreme reversed bounds now return empty results instead of throwing, including multidimensional and fixed-dimension array slices.

Copilot and others added 2 commits September 15, 2026 15:09
Add the original request and one self-contained implementation sprint. Cover safe RED cases, all eleven getter bodies and twenty-one dimension counts, based-array boundaries, recompiled consumers, local validation, expert review, and release notes.

Validated sprint structure, Markdown tables, repository paths, and getter inventory locally. Product implementation and tests remain sprint work; the pinned SDK was unavailable during planning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a6e8d16-3869-4b65-aea1-634f25e2dbaf
Normalize retained getter dimensions with an inclusive upper bound and
compare endpoints before subtracting. Preserve each retained axis, based
indices, null exceptions and fixed-index validation timing. Leave setters,
copy helpers, signatures and fixed-getter source offsets unchanged.

Validation:
- RED before product edits: 44/44 regression cases failed for netstandard2.0,
  netstandard2.1 and shipped net10.0 Core, plus the actual default test host.
- GREEN: 44/44 passed for freshly compiled consumers of all three targets
  in Debug and Release, exercising slice syntax and callable intrinsic bodies.
- Debug and Release composite builds passed with no warnings or errors.
- Original siblings passed 33/33; broader slicing selection passed 127/127.
- Full default Release Core suite: 6337 passed, 5 existing skips, 0 failures.
  Both surface-area checks passed without baseline changes.
- Local expert review: LGTM, no actionable findings or new API dependencies.

Consumers were recompiled against each local Core assembly. Replacing
FSharp.Core alone does not repair arithmetic already inlined into old binaries.
Commands, RED/GREEN results, references, identities and binlogs are retained
in the ignored .tools/ralph/evidence/issue-20530 directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d1025155-aaf9-4029-965e-790914c9bad7
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev


✅ Found changes and release notes in following paths:

Change path Release notes path Description
`src/FSharp.Core` docs/release-notes/.FSharp.Core/11.0.100.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6fa70800-9879-48dc-b7c3-a195759cf4dd
@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Sep 15, 2026
Copilot and others added 2 commits September 16, 2026 00:25
Recover the test-only delta from 1afa05af5860496aa21e5611581406b0f8a0a634. Keep all supported Desktop rows and preserve the getter implementation.

Both compressed Release SDK configurations pass Desktop/CoreCLR shape 38/39, getters 43/45, siblings 125/127, and full Core suites 6255/6337 with five existing skips each. Exact VS composite configurations remain pending on compatible infrastructure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8fdec442-2296-4dcd-b96f-f499a8485cdd
Keep working copies for the runner. Preserve plans and validation evidence outside the worktree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8fdec442-2296-4dcd-b96f-f499a8485cdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Array and string slicing throw when the finish bound is near Int32.MinValue

1 participant