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 ABI break #605

Merged
merged 1 commit into from
Jun 29, 2021
Merged

Fix ABI break #605

merged 1 commit into from
Jun 29, 2021

Conversation

azeey
Copy link
Collaborator

@azeey azeey commented Jun 28, 2021

🦟 Bug fix

Summary

This moves the recently added data member explicitlySetInFile to the
end of the ElementPrivate class to an ABI breakage (See gazebosim/gz-sim#891).

We are using the Pimpl pattern with the Element class to avoid ABI issues, however, we have template functions that use data members from the ElementPrivate class in Element.hh. These templates can get instantiated in a translation unit outside of the ones used to build libsdformat and the offset values for the data members be computed based on the order of the members at the time the translation unit is compiled. When we later change the order of the data members, the offsets in the translation units will become invalid causing a crash as seen in gazebosim/gz-sim#891

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Code check passed (In source directory, run sh tools/code_check.sh)
  • 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

This moves the recently added data member `explicitlySetInFile` to the
end of the `ElementPrivate` class

Signed-off-by: Addisu Z. Taddese <[email protected]>
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Jun 28, 2021
@azeey azeey self-assigned this Jun 28, 2021
@azeey azeey mentioned this pull request Jun 28, 2021
7 tasks
@azeey
Copy link
Collaborator Author

azeey commented Jun 28, 2021

@osrf-jenkins run tests please

@chapulina
Copy link
Contributor

chapulina commented Jun 28, 2021

That variable was added in #542, which hasn't been released into sdf9 yet, so Citadel or Gazebo 11 users shouldn't notice this happened.

sdformat9_9.5.0...sdf9

@chapulina
Copy link
Contributor

@osrf-jenkins run tests you can

@chapulina
Copy link
Contributor

I enabled the DCO bot after this PR was open. Let's merge without that check for now, reopening the PR would trigger lots of builds.

@chapulina chapulina merged commit 01bb85f into gazebosim:sdf9 Jun 29, 2021
jennuine pushed a commit that referenced this pull request Jul 29, 2021
This moves the recently added data member `explicitlySetInFile` to the
end of the `ElementPrivate` class

Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants