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

Check for required serdata ops before enabling PSMX on an endpoint #1859

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

gmartin82
Copy link
Contributor

This PR adds an additional check to dds_ensure_valid_psmx_instances() which validates that the required serdata operations are present for the sertype. For a writer, it checks for the from_loaned_sample() operation; for a reader, it checks for the from_psmx() operation. If the required operation is not present no PSMX instances will be added to the supported_psmx list.

Without this (or a similar) check, Cyclone may call these operations on a custom sertype implementation that doesn't provide implementations potentially resulting in a segmentation fault. As an example of this, the Zenoh DDS Bridge uses such a custom sertype which is used when type information isn't available.

Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

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

Thank you @gmartin82 for eliminating that nice little gotcha.

@eboasson eboasson merged commit 8c49a2b into eclipse-cyclonedds:master Oct 23, 2023
21 of 23 checks passed
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