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

Ensure correct boost singleton destruction order [13288] #2356

Merged
merged 4 commits into from
Dec 17, 2021

Conversation

MiguelCompany
Copy link
Member

The first time an interprocess synchronization object is created by boost, a singleton is instantiated and its destructor is registered with std::atexit(&atexit_work).

This PR ensures that singleton is created before the DomainParticipantFactory instance so that it is destroyed after all the participants have been deleted.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Copy link
Contributor

@JLBuenoLopez JLBuenoLopez left a comment

Choose a reason for hiding this comment

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

Only a typo

src/cpp/fastdds/domain/DomainParticipantFactory.cpp Outdated Show resolved Hide resolved
@MiguelCompany MiguelCompany changed the title Ensure correct boost singleton destruction order. Ensure correct boost singleton destruction order [13288] Dec 16, 2021
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
JLBuenoLopez
JLBuenoLopez previously approved these changes Dec 16, 2021
Copy link
Contributor

@JLBuenoLopez JLBuenoLopez left a comment

Choose a reason for hiding this comment

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

👌

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Copy link
Contributor

@JLBuenoLopez JLBuenoLopez left a comment

Choose a reason for hiding this comment

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

LGTM

@MiguelCompany MiguelCompany merged commit 80a44fe into master Dec 17, 2021
@MiguelCompany MiguelCompany deleted the bugfix/13287 branch December 17, 2021 06:07
@MiguelCompany
Copy link
Member Author

@Mergifyio backport 2.4.x 2.3.x

mergify bot pushed a commit that referenced this pull request Dec 17, 2021
* Refs 13287. Ensure correct boost singleton destruction order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed typo.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed link error on ListenerTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 80a44fe)
mergify bot pushed a commit that referenced this pull request Dec 17, 2021
* Refs 13287. Ensure correct boost singleton destruction order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed typo.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed link error on ListenerTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 80a44fe)

# Conflicts:
#	test/unittest/dds/status/CMakeLists.txt
@mergify
Copy link
Contributor

mergify bot commented Dec 17, 2021

backport 2.4.x 2.3.x

✅ Backports have been created

MiguelCompany added a commit that referenced this pull request Jan 21, 2022
* Ensure correct boost singleton destruction order (#2356)

* Refs 13287. Ensure correct boost singleton destruction order.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed typo.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 13288. Fixed link error on ListenerTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 80a44fe)

# Conflicts:
#	test/unittest/dds/status/CMakeLists.txt

* Refs 13287. Fix conflicts.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
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.

2 participants