Skip to content

Conversation

@richiware
Copy link
Member

@richiware richiware 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.

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
@MiguelCompany MiguelCompany added this to the v2.3.4 milestone Oct 24, 2025
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
@MiguelCompany MiguelCompany self-requested a review October 24, 2025 08:54
@richiware richiware merged commit 486ce90 into master Oct 24, 2025
12 checks passed
@richiware richiware deleted the bugfix/23838 branch October 24, 2025 09:04
@MiguelCompany
Copy link
Member

@Mergifyio backport 2.2.x

@mergify
Copy link

mergify bot commented Oct 24, 2025

backport 2.2.x

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Oct 24, 2025
* Refs #23838. Regression test

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #23838. Fix

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #23838. Apply suggestions

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

---------

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
(cherry picked from commit 486ce90)
@richiware richiware changed the title XCDRv1: support extra bytes in optional types [23848] XCDRv1: support extra bytes in optional types Oct 24, 2025
MiguelCompany pushed a commit that referenced this pull request Oct 24, 2025
* Refs #23838. Regression test



* Refs #23838. Fix



* Refs #23838. Apply suggestions



---------


(cherry picked from commit 486ce90)

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Co-authored-by: Ricardo González <ricardo@richiware.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants