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

Fix static variable data race access [17163] #3282

Merged
merged 2 commits into from
Jun 21, 2023
Merged

Conversation

jparisu
Copy link
Contributor

@jparisu jparisu commented Feb 8, 2023

Signed-off-by: jparisu javierparis@eprosima.com

There is a static (global) variable that is supposed to contain default values, but it does not.
This variable is sent to multiple functions by default by reference, where it is modified (it is not default anymore) without guards (TSAN issues).

Description

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
  • Any new/modified methods have been properly documented using Doxygen.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • Documentation builds and tests pass locally.
  • 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.

@jparisu jparisu changed the title Fix static variable data race access Fix static variable data race access [17163] Feb 10, 2023
@JLBuenoLopez JLBuenoLopez added this to the v2.11.0 milestone Mar 16, 2023
Signed-off-by: jparisu <javierparis@eprosima.com>
@jsan-rt jsan-rt modified the milestones: v2.11.0, v2.11.1 Jun 13, 2023
@jsan-rt
Copy link
Contributor

jsan-rt commented Jun 13, 2023

#3283 has introduced changes to function signatures that require additional work on this PR.

Signed-off-by: jparisu <javierparis@eprosima.com>
@jsan-rt
Copy link
Contributor

jsan-rt commented Jun 13, 2023

@richiprosima please test this

@jsan-rt jsan-rt modified the milestones: v2.11.1, v2.11.0 Jun 13, 2023
@jsan-rt
Copy link
Contributor

jsan-rt commented Jun 16, 2023

@richiprosima please test windows

Copy link
Contributor

@jsan-rt jsan-rt left a comment

Choose a reason for hiding this comment

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

LGTM assuming Windows CI succeeds. ASAN test failure is unrelated, Linux failing test is unrelated.

@jsan-rt jsan-rt added the ci-pending PR which CI is running label Jun 16, 2023
@Mario-DL Mario-DL 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 Jun 20, 2023
@EduPonz EduPonz merged commit 7d5fe85 into master Jun 21, 2023
@EduPonz EduPonz deleted the fix/tsan-writeparams branch June 21, 2023 05:24
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.

5 participants