Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20701] Enforce SHM ports open mode exclusions #4635

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Mar 27, 2024

Description

As originally reported in #4504 a port could be open first with ReadShared and then with ReadExclusive the internal state of the port was incorrectly changed. This meant that the same port could be used at the same time for unicast and multicast.

This PR fixes #4634 by checking incompatibilities inside lock_read_exlcusive / lock_read_shared methods of the Port class.

@Mergifyio backport 2.13.x 2.10.x 2.6.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 ABI compatible.
  • Changes are API compatible.
  • 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

  • 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: failing tests are unrelated with the changes.

@MiguelCompany MiguelCompany added this to the v2.14.1 milestone Mar 27, 2024
@EduPonz
Copy link

EduPonz commented Apr 2, 2024

@Mergifyio backport 2.13.x 2.10.x 2.6.x

@EduPonz EduPonz self-requested a review April 2, 2024 12:27
Copy link
Contributor

mergify bot commented Apr 2, 2024

backport 2.13.x 2.10.x 2.6.x

✅ Backports have been created

@github-actions github-actions bot added the ci-pending PR which CI is running label Apr 2, 2024
@EduPonz
Copy link

EduPonz commented Apr 2, 2024

@richiprosima please test this

@EduPonz EduPonz merged commit 3d159dc into master Apr 3, 2024
14 of 16 checks passed
@EduPonz EduPonz deleted the bugfix/20701 branch April 3, 2024 05:16
@EduPonz EduPonz removed the ci-pending PR which CI is running label Apr 3, 2024
mergify bot pushed a commit that referenced this pull request Apr 3, 2024
* Refs #20701. Added unit regression tests.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Added blackbox regression test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Fix issue.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 3d159dc)
mergify bot pushed a commit that referenced this pull request Apr 3, 2024
* Refs #20701. Added unit regression tests.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Added blackbox regression test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Fix issue.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 3d159dc)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportSHM.cpp
mergify bot pushed a commit that referenced this pull request Apr 3, 2024
* Refs #20701. Added unit regression tests.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Added blackbox regression test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Fix issue.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 3d159dc)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportSHM.cpp
MiguelCompany added a commit that referenced this pull request Apr 12, 2024
* Enforce SHM ports open mode exclusions (#4635)

* Refs #20701. Added unit regression tests.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Added blackbox regression test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Fix issue.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 3d159dc)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportSHM.cpp

* Fix conflicts

Signed-off-by: Miguel Company <[email protected]>

* Fix build on unit test

Signed-off-by: Miguel Company <[email protected]>

* Fix build on unit test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
EduPonz pushed a commit that referenced this pull request Apr 17, 2024
* Refs #20701. Added unit regression tests.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Added blackbox regression test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #20701. Fix issue.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 3d159dc)

Co-authored-by: Miguel Company <[email protected]>
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.

SHM port OpenMode compatibility is not always enforced
2 participants