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 initialization and thread-safety of SDF::Version() global #1522

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

jwnimmer-tri
Copy link
Contributor

@jwnimmer-tri jwnimmer-tri commented Dec 31, 2024

🦟 Bug fix

Towards #552, but just one piece.

Summary

Replace a static global variable that used a pre-main constructor with a latch-initialized static local variable and mutex to guard the writes.

This does not change API but it does change ABI. Therefore, it targets the main branch instead of sdf15.

Checklist

  • Signed all commits for DCO
  • (N/A) Added tests
  • Updated documentation (as needed)
  • (N/A) Updated migration guide (as needed)
  • (N/A) Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Replace a static global variable that used a pre-main constructor with
a latch-initialized static local variable and mutex to guard the writes.

This does not change API but it does change ABI.

Signed-off-by: Jeremy Nimmer <[email protected]>
@ahcorde ahcorde merged commit 5d9623e into gazebosim:main Jan 6, 2025
15 checks passed
@jwnimmer-tri jwnimmer-tri deleted the version-global branch January 6, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants