Skip to content

[23684] Fix mutable size-three optional serialization#253

Merged
MiguelCompany merged 3 commits intomasterfrom
hotfix/mutable_sizethree_optional
Sep 11, 2025
Merged

[23684] Fix mutable size-three optional serialization#253
MiguelCompany merged 3 commits intomasterfrom
hotfix/mutable_sizethree_optional

Conversation

@jepemi
Copy link
Copy Markdown
Contributor

@jepemi jepemi commented Dec 12, 2024

Description

This PR fixes mutable calculate_serialized_size of a size-three optional type. XCDR2 EMHEADER size wrongly computed (4 bytes) for mutable optional field with size different from 1, 2, 4 or 8. It should have a 8 bytes EMHEADER.

@final
struct FinalSizeThree
{
    octet a;
    octet b;
    octet c;
};

@mutable
struct RegressionType
{
    @optional FinalSizeThree opt_fin_size_three;
};

@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
  • N/A 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.

@MiguelCompany MiguelCompany added this to the v2.2.7 milestone Dec 18, 2024
@MiguelCompany MiguelCompany modified the milestones: v2.2.7, v2.3.0 Mar 5, 2025
@MiguelCompany MiguelCompany modified the milestones: v2.3.0, v2.3.1 Mar 18, 2025
@MiguelCompany MiguelCompany changed the title Fix mutable size-three optional serialization [23684] Fix mutable size-three optional serialization Sep 10, 2025
@jepemi jepemi force-pushed the hotfix/mutable_sizethree_optional branch from ceced5a to 1470ddb Compare September 10, 2025 13:52
@MiguelCompany MiguelCompany marked this pull request as ready for review September 11, 2025 07:41
Signed-off-by: Jesus Perez <[email protected]>
Copy link
Copy Markdown
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

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

LGTM with green CI

@MiguelCompany MiguelCompany merged commit f00d560 into master Sep 11, 2025
12 checks passed
@MiguelCompany MiguelCompany deleted the hotfix/mutable_sizethree_optional branch September 11, 2025 08:42
@MiguelCompany
Copy link
Copy Markdown
Member

@Mergifyio backport 2.2.x

@mergify
Copy link
Copy Markdown

mergify Bot commented Sep 11, 2025

backport 2.2.x

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Sep 11, 2025
* Refs #23684: Add regression test

Signed-off-by: Jesus Perez <[email protected]>

* Refs #23684: Fix mutable size-three optional serialization

Signed-off-by: Jesus Perez <[email protected]>

* Refs #23684: Uncrustify

Signed-off-by: Jesus Perez <[email protected]>

---------

Signed-off-by: Jesus Perez <[email protected]>
(cherry picked from commit f00d560)
MiguelCompany pushed a commit that referenced this pull request Sep 11, 2025
* Refs #23684: Add regression test



* Refs #23684: Fix mutable size-three optional serialization



* Refs #23684: Uncrustify



---------


(cherry picked from commit f00d560)

Signed-off-by: Jesus Perez <[email protected]>
Co-authored-by: Jesús Pérez <[email protected]>
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.

2 participants