Skip to content

[21670] Avoid Data Race in Reader Locator (backport #5833)#5840

Merged
MiguelCompany merged 1 commit into
3.1.xfrom
mergify/bp/3.1.x/pr-5833
Jun 5, 2025
Merged

[21670] Avoid Data Race in Reader Locator (backport #5833)#5840
MiguelCompany merged 1 commit into
3.1.xfrom
mergify/bp/3.1.x/pr-5833

Conversation

@mergify

@mergify mergify Bot commented May 30, 2025

Copy link
Copy Markdown
Contributor

Description

This PR modifies find_local_reader method to assign the local_reader shared pointer within the function, instead of returning the value. In this way, all operations are protected by the RTPSDomain mutex and no data race can occur.

This Data Race is reported by DDS Router CI.

Contributor Checklist

  • Commit messages follow the project guidelines.

  • The code follows the style guidelines of this project.

  • N/A 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 Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • N/A Changes are backport compatible: they do NOT break ABI nor change library core behavior.

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

  • N/A 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.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

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

* Refs #21670: Avoid Data Race in Reader Locator

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #21670: Apply review

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit e15acec)
@mergify mergify Bot mentioned this pull request May 30, 2025
8 tasks
@MiguelCompany MiguelCompany added this to the v3.1.3 milestone May 30, 2025
@Mario-DL
Mario-DL requested review from Mario-DL and removed request for Mario-DL June 4, 2025 06:47
@github-actions github-actions Bot added the ci-pending PR which CI is running label Jun 4, 2025
@MiguelCompany
MiguelCompany merged commit 468fc46 into 3.1.x Jun 5, 2025
@MiguelCompany
MiguelCompany deleted the mergify/bp/3.1.x/pr-5833 branch June 5, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants