[25475] Catch exception when constructing a payload pool Node#6460
Merged
Conversation
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Member
Author
|
@Mergifyio backport 3.2.x 2.14.x |
Contributor
✅ Backports have been createdDetails
|
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
This was referenced Jul 1, 2026
MiguelCompany
added a commit
that referenced
this pull request
Jul 2, 2026
* Refs #25475. Regression test. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Capture exception when constructing PayloadNode. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Bonus: avoid using sizeof(NodeInfo). Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Fix uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 31ece6f)
MiguelCompany
added a commit
that referenced
this pull request
Jul 3, 2026
* Refs #25475. Regression test. * Refs #25475. Capture exception when constructing PayloadNode. * Refs #25475. Bonus: avoid using sizeof(NodeInfo). * Refs #25475. Fix uncrustify. --------- (cherry picked from commit 31ece6f) Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany
added a commit
that referenced
this pull request
Jul 3, 2026
* Refs #25475. Regression test. * Refs #25475. Capture exception when constructing PayloadNode. * Refs #25475. Bonus: avoid using sizeof(NodeInfo). * Refs #25475. Fix uncrustify. --------- (cherry picked from commit 31ece6f) Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Member
Author
|
@Mergifyio backport 2.6.x |
Contributor
✅ Backports have been createdDetails
Cherry-pick of 31ece6f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
12 tasks
MiguelCompany
added a commit
that referenced
this pull request
Jul 3, 2026
* Refs #25475. Regression test. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Capture exception when constructing PayloadNode. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Bonus: avoid using sizeof(NodeInfo). Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #25475. Fix uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 31ece6f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a common misuse of
std::nothrow. Callingnew (std::nothrow) T()only avoids throwing when allocating T, but exceptions thrown when executing T's constructor are not avoided.This fixes the problem by capturing
std::bad_allocwhen creating the node.A regression test is also added.
@Mergifyio backport 3.2.x 2.14.x
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist