• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icerpc / icerpc-csharp / 33005782383
86%

Build:
DEFAULT BRANCH: main
Ran 26 Aug 2026 07:36PM UTC
Jobs 1
Files 257
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2026 07:33PM UTC coverage: 87.783% (-0.2%) from 87.959%
33005782383

push

github

web-flow
Validate the limits of IceFeature and SliceFeature (#4862)

Fixes #4808.

The `IceFeature` and `SliceFeature` constructors accepted limits their
consumers can't handle:

- The derived collection-allocation budget (`8 * maxPayloadSize` / `8 *
maxSegmentSize`) wrapped negative for sizes above `int.MaxValue / 8`.
- `IceFeature` accepted a max payload size of `int.MaxValue` while the
Ice payload reader computes `maxSize + 1`, and accepted a max depth of
`0` that `IceDecoder` rejects later, at decode time.
- Negative values other than `-1` were silently treated as "use the
default", while the doc-comments only allow `-1`.

The constructors now throw `ArgumentOutOfRangeException` for all of
these, per the documented contract:

- `maxCollectionAllocation`: `0`, a positive value, or `-1`.
- `maxSegmentSize`: a positive value or `-1` — the smallest Slice
segment is 1 byte (the tag end marker).
- `maxPayloadSize`: `0`, a positive value, or `-1` — the smallest Ice
payload is empty (a void operation); also rejects `int.MaxValue` (the
Ice read path computes `maxSize + 1`).
- Both: at most `int.MaxValue / 8` (256 MB) when
`maxCollectionAllocation` is `-1` (the derived `8 ×` budget must not
overflow).
- `maxDepth`: a positive value or `-1`.

The Slice segment reader's asserts required `maxSize < int.MaxValue`
without an arithmetic reason (the segment size decode uses a checked
cast and a plain comparison), so they are relaxed to `maxSize > 0`; the
Ice reader's asserts are relaxed to `maxSize >= 0` since the empty
payload is a valid Ice payload.

## What's Changed entry

None — only rejects invalid configurations that no reasonable program
uses.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

14 of 42 new or added lines in 4 files covered. (33.33%)

12 existing lines in 2 files now uncovered.

12402 of 14128 relevant lines covered (87.78%)

2995.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
66.67
-30.11% src/IceRpc.Ice/Features/IceFeature.cs
12
65.79
-29.86% src/IceRpc.Slice/Features/SliceFeature.cs

Coverage Regressions

Lines Coverage ∆ File
10
88.92
-0.89% src/IceRpc/Transports/Slic/Internal/SlicConnection.cs
2
79.1
-1.49% src/IceRpc/Transports/Slic/Internal/SlicPipeReader.cs
Jobs
ID Job ID Ran Files Coverage
1 33005782383.1 26 Aug 2026 07:36PM UTC 3841
15.6
GitHub Action Run
Source Files on build 33005782383
  • Tree
  • List 257
  • Changed 206
  • Source Changed 4
  • Coverage Changed 206
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33005782383
  • cea842e8 on github
  • Prev Build on main (#33004725954)
  • Next Build on main (#33016973429)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc