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

[16360] Protect from uncaught exception during SHM Segment creation. (backport #3293) #3332

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 28, 2023

This is an automatic backport of pull request #3293 done by Mergify.
Cherry-pick of 72d1ba1 has failed:

On branch mergify/bp/2.8.x/pr-3293
Your branch is up to date with 'origin/2.8.x'.

You are currently cherry-picking commit 72d1ba171.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/cpp/rtps/DataSharing/DataSharingNotification.hpp
	modified:   src/cpp/rtps/transport/shared_mem/SharedMemManager.hpp
	modified:   src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp
	modified:   src/cpp/utils/shared_memory/SharedMemSegment.hpp
	new file:   test/mock/rtps/SharedMemSegment/utils/shared_memory/SharedMemSegment.hpp
	modified:   test/unittest/CMakeLists.txt
	new file:   test/unittest/rtps/DataSharing/CMakeLists.txt
	new file:   test/unittest/rtps/DataSharing/SHMSegmentTests.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/DataSharing/WriterPool.hpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* Added regression test

Signed-off-by: Javier Santiago <[email protected]>

* Fix Segfault when SharedSegment::compute_per_allocation_extra_size throws

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs #16360: Added comments and remove some unneeded code

Signed-off-by: Javier Santiago <[email protected]>

* Applied suggestions

Signed-off-by: Javier Santiago <[email protected]>

* Uncrustify

Signed-off-by: Javier Santiago <[email protected]>

* Fixed Windows warnings

Signed-off-by: Javier Santiago <[email protected]>

* Added NOMINMAX flag to test

Signed-off-by: Javier Santiago <[email protected]>

---------

Signed-off-by: Javier Santiago <[email protected]>
Signed-off-by: Eduardo Ponz <[email protected]>
Co-authored-by: Eduardo Ponz <[email protected]>
(cherry picked from commit 72d1ba1)

# Conflicts:
#	src/cpp/rtps/DataSharing/WriterPool.hpp
@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label Feb 28, 2023
Signed-off-by: Javier Santiago <[email protected]>
Signed-off-by: Javier Santiago <[email protected]>
@JLBuenoLopez
Copy link
Contributor

@jsantiago-eProsima this also has conflicts. Could you look into it?

@JLBuenoLopez JLBuenoLopez added this to the v2.8.2 milestone Mar 16, 2023
@jsan-rt jsan-rt added ci-pending PR which CI is running and removed conflicts Backport PR wich git cherry pick failed labels Mar 16, 2023
@Mario-DL
Copy link
Member

@richiprosima please test this

@Mario-DL
Copy link
Member

@richiprosima please test linux

@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 Mar 23, 2023
@MiguelCompany MiguelCompany merged commit c61a42a into 2.8.x Mar 24, 2023
@MiguelCompany MiguelCompany deleted the mergify/bp/2.8.x/pr-3293 branch March 24, 2023 06:44
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.

4 participants