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

icerpc / icerpc-csharp / 32500677740
86%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2026 04:03PM UTC
Jobs 1
Files 257
Run time 4min
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

21 Aug 2026 04:00PM UTC coverage: 87.915% (-0.1%) from 88.011%
32500677740

push

github

web-flow
Reject encoding a fully-sliced class instance with the Compact class format (#4836)

When a class instance decoded with an activator that knows none of its
type IDs (a fully-sliced `UnknownIceClass`) is re-encoded using the
Compact class format — the default — `EncodeInstance` writes the class
instance marker and then nothing: the preserved slices are only
re-encoded in Sliced format, and `UnknownIceClass.EncodeCore` is empty.
The peer then misparses whatever bytes follow as the instance's first
slice header, typically failing with `InvalidDataException: Cannot skip
a class slice with no type ID`, and the corruption desynchronizes the
rest of the encapsulation.

This PR makes the encoder reject this locally instead of emitting a
corrupt payload:

- `EncodeInstance` now throws `NotSupportedException` when encoding an
`UnknownIceClass` with a class format other than Sliced. Partially-known
instances are unaffected: they still drop their preserved slices in
Compact format and encode their known slices, as intended.
- The now-unreachable throw in `EncodeUnknownSlices` (its only call site
requires the Sliced format) is replaced by a `Debug.Assert`, and the
stale comment above it is corrected.
- Adds a regression test.

## What's Changed entry

Area: Ice codec

- Encoding a fully-sliced class instance with the Compact class format
now fails with `NotSupportedException` instead of producing a corrupt
payload.

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

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

11 of 11 new or added lines in 1 file covered. (100.0%)

32 existing lines in 4 files now uncovered.

12345 of 14042 relevant lines covered (87.91%)

3020.23 hits per line

Coverage Regressions

Lines Coverage ∆ File
16
88.92
-1.43% src/IceRpc/Transports/Slic/Internal/SlicConnection.cs
9
79.61
-8.74% src/IceRpc/Internal/PipeReaderExtensions.cs
6
74.63
-4.48% src/IceRpc/Transports/Slic/Internal/SlicPipeReader.cs
1
92.29
1.08% src/IceRpc/Server.cs
Jobs
ID Job ID Ran Files Coverage
1 32500677740.1 21 Aug 2026 04:03PM UTC 3841
15.6
GitHub Action Run
Source Files on build 32500677740
  • Tree
  • List 257
  • Changed 206
  • Source Changed 1
  • Coverage Changed 206
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32500677740
  • b89babe5 on github
  • Prev Build on main (#32426908561)
  • Next Build on main (#32500761884)
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