Skip to content

XCDRv1: support extra bytes in optional types (backport #285)#286

Merged
MiguelCompany merged 1 commit into2.2.xfrom
mergify/bp/2.2.x/pr-285
Oct 24, 2025
Merged

XCDRv1: support extra bytes in optional types (backport #285)#286
MiguelCompany merged 1 commit into2.2.xfrom
mergify/bp/2.2.x/pr-285

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Oct 24, 2025

Description

Some XCDRv1 implementations add extra bytes, usually alignment bytes, at the end of the serialized base type of an optional type. And this extra bytes are took into account in the parameter's length which describes the optional. Currently fastcdr doesn't support this. The parameter's length of a optional has to have the exact length of the serialized base type.

This PR introduces this flexibility to support other XCDRv1 implementations.

@Mergifyio backport 2.2.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Any new/modified methods have been properly documented using Doxygen.
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: CI pass and failing tests are unrelated with the changes.

This is an automatic backport of pull request #285 done by [Mergify](https://mergify.com).

* Refs #23838. Regression test

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #23838. Fix

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #23838. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
(cherry picked from commit 486ce90)
@MiguelCompany MiguelCompany added this to the v2.2.7 milestone Oct 24, 2025
@MiguelCompany MiguelCompany merged commit 200f0dd into 2.2.x Oct 24, 2025
8 checks passed
@MiguelCompany MiguelCompany deleted the mergify/bp/2.2.x/pr-285 branch October 24, 2025 09:11
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.

2 participants