Skip to content

Implement a validity check for firstSN#3274

Merged
MiguelCompany merged 3 commits intoeProsima:masterfrom
squizz617:pr-fix-3236
Mar 16, 2023
Merged

Implement a validity check for firstSN#3274
MiguelCompany merged 3 commits intoeProsima:masterfrom
squizz617:pr-fix-3236

Conversation

@squizz617
Copy link
Copy Markdown
Contributor

@squizz617 squizz617 commented Feb 7, 2023

This commit suggests a fix for issue #3236.

Description

As per 8.3.8.6.3 of DDS-RTPS 2.5, "Heartbeat submessage is invalid if firstSN.value is zero or negative". However, a check for this property is missing. This leads to an assertion failure when an invalid firstSN is provided (see issue #3236).

@Mergifyio backport 2.9.x

Fixes #3236

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.
  • (N/A) Changes are ABI compatible.
  • (N/A) Changes are API compatible.
  • (N/A) Documentation builds and tests pass locally.
  • (N/A) New feature has been added to the versions.md file (if applicable).
  • (N/A) New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue eProsima#3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
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.

@squizz617 Thank you for your contribution!

This is not building (see my comment below).

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
@squizz617
Copy link
Copy Markdown
Contributor Author

Sorry, made a mistake while moving stuffs into the pr branch :(
Fixed and pushed!

@squizz617
Copy link
Copy Markdown
Contributor Author

Hi @MiguelCompany, I'm just wondering if you've looked at the changes. Thank you.

@MiguelCompany
Copy link
Copy Markdown
Member

Hi @MiguelCompany, I'm just wondering if you've looked at the changes. Thank you.

@squizz617 Changes look good to me. Is it possible that you could add a regression test for this?

I think that adding a new file here would be enough

@MiguelCompany MiguelCompany added this to the v2.10.0 milestone Mar 15, 2023
Signed-off-by: Seulbae Kim <squizz617@gmail.com>
@squizz617
Copy link
Copy Markdown
Contributor Author

squizz617 commented Mar 15, 2023

@MiguelCompany Done! I temporarily named the file input_issue3236, but please change it if needed.

@MiguelCompany
Copy link
Copy Markdown
Member

@richiprosima Please test this

@MiguelCompany MiguelCompany added the ci-pending PR which CI is running label Mar 15, 2023
@MRicoIE2CS MRicoIE2CS added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Mar 16, 2023
@MiguelCompany
Copy link
Copy Markdown
Member

@Mergifyio backport 2.9.x 2.8.x 2.6.x

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 16, 2023

backport 2.9.x 2.8.x 2.6.x

✅ Backports have been created

Details

@MiguelCompany MiguelCompany merged commit 3aa3ee0 into eProsima:master Mar 16, 2023
mergify bot pushed a commit that referenced this pull request Mar 16, 2023
* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)
mergify bot pushed a commit that referenced this pull request Mar 16, 2023
* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)
mergify bot pushed a commit that referenced this pull request Mar 16, 2023
* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)
MiguelCompany pushed a commit that referenced this pull request Mar 22, 2023
* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)

Co-authored-by: Seulbae Kim <squizz617@gmail.com>
MiguelCompany pushed a commit that referenced this pull request Mar 24, 2023
* Implement a validity check for firstSN (#3274)

* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)

* Refs #17717: Logging Macro fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Co-authored-by: Seulbae Kim <squizz617@gmail.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>
JLBuenoLopez pushed a commit that referenced this pull request Apr 11, 2023
* Implement a validity check for firstSN (#3274)

* Implement a validity check for firstSN

Following 8.3.8.6.3 of DDS-RTPS 2.5.
This fixes issue #3236.

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* fix typo

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

* add test input for issue #3236 (pr #3274)

Signed-off-by: Seulbae Kim <squizz617@gmail.com>

---------

Signed-off-by: Seulbae Kim <squizz617@gmail.com>
(cherry picked from commit 3aa3ee0)

* Refs #17717: Logging Macro fix

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Co-authored-by: Seulbae Kim <squizz617@gmail.com>
Co-authored-by: Mario Dominguez <mariodominguez@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failure in SequenceNumber.h via malformed SPDP packet only when compiled in logging-enabled (Debug) mode

3 participants