Skip to content

Add maxCollectionAllocation tests for Ice#4372

Merged
bernardnormier merged 1 commit intoicerpc:mainfrom
bernardnormier:ice-codec-tests
Apr 6, 2026
Merged

Add maxCollectionAllocation tests for Ice#4372
bernardnormier merged 1 commit intoicerpc:mainfrom
bernardnormier:ice-codec-tests

Conversation

@bernardnormier
Copy link
Copy Markdown
Member

Fixes #4367.

Copy link
Copy Markdown

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

Adds Ice codec parity tests to ensure maxCollectionAllocation limits are enforced consistently when decoding strings, sequences, and dictionaries (Fixes #4367).

Changes:

  • Add maxCollectionAllocation overflow/within-limit tests for IceDecoder.DecodeString.
  • Add maxCollectionAllocation overflow/within-limit tests for IceDecoderExtensions.DecodeSequence.
  • Add maxCollectionAllocation overflow/within-limit tests for IceDecoderExtensions.DecodeDictionary.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/IceRpc.Ice.Codec.Tests/StringDecodingTests.cs Adds tests covering maxCollectionAllocation behavior when decoding strings.
tests/IceRpc.Ice.Codec.Tests/SequenceDecodingTests.cs Adds tests covering maxCollectionAllocation behavior when decoding sequences.
tests/IceRpc.Ice.Codec.Tests/DictionaryDecodingTests.cs Adds tests covering maxCollectionAllocation behavior when decoding dictionaries.

Copy link
Copy Markdown
Member

@externl externl left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@bernardnormier bernardnormier merged commit 0a5e39e into icerpc:main Apr 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We should add the same tests for the Ice codec.

4 participants